forked from taye/interact.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.babelrc.js
33 lines (31 loc) · 1.03 KB
/
.babelrc.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
module.exports = {
presets: [
...process.env.NODE_ENV === 'test'
? []
: [require('@babel/preset-env').default],
[require('@babel/preset-typescript').default, {
allExtensions: true,
isTSX: true,
}],
],
plugins:
process.env.NODE_ENV !== 'production'
? [
require('./scripts/babelTransformForOfArray'),
require('@babel/plugin-proposal-class-properties').default,
require('@babel/plugin-transform-modules-commonjs').default,
require('@babel/plugin-proposal-optional-catch-binding').default,
]
: [
require('@babel/plugin-proposal-optional-catch-binding').default,
[require('@babel/plugin-transform-runtime').default, {
helpers: false,
regenerator: false,
}],
require('@babel/plugin-proposal-class-properties'),
[require('babel-plugin-transform-inline-environment-variables'), {
include: ['NODE_ENV', 'npm_package_version'],
}],
],
ignore: [/\/node_modules\/(?!@interactjs\/)/],
}