-
Notifications
You must be signed in to change notification settings - Fork 0
/
babel.config.js
47 lines (47 loc) · 1.11 KB
/
babel.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
module.exports = {
presets: [
[
'@babel/preset-env',
{
modules: false,
},
],
['@babel/preset-react', { useSpread: true }],
'@babel/preset-typescript',
],
plugins: [
[
'@babel/plugin-transform-runtime',
// By default, it assumes @babel/runtime@7.0.0. Since we use >7.0.0, better to
// explicitly specify the version so that it can reuse the helper better
// See https://github.com/babel/babel/issues/10261
// eslint-disable-next-line import/no-extraneous-dependencies, @typescript-eslint/no-var-requires
{ version: require('@babel/runtime/package.json').version },
],
'@babel/plugin-proposal-class-properties',
'babel-plugin-typescript-to-proptypes',
'ramda',
[
'babel-plugin-styled-components',
{
displayName: false,
fileName: false,
},
],
],
env: {
test: {
presets: [
[
'@babel/preset-env',
{
modules: 'commonjs',
},
],
],
},
production: {
ignore: ['**/__tests__', '**/**/__tests__'],
},
},
};