2018-12-18 15:51:21 +01:00
|
|
|
module.exports = {
|
|
|
|
presets: [
|
|
|
|
[
|
|
|
|
'@babel/preset-env',
|
|
|
|
{
|
|
|
|
modules: false,
|
|
|
|
targets: {
|
|
|
|
browsers: [
|
|
|
|
'last 3 Chrome versions',
|
|
|
|
'last 3 Firefox versions',
|
|
|
|
'last 3 Safari versions',
|
|
|
|
'last 3 Edge versions',
|
|
|
|
'IE 11'
|
|
|
|
]
|
|
|
|
},
|
2019-03-22 11:05:08 +01:00
|
|
|
corejs: 3,
|
2018-12-18 15:51:21 +01:00
|
|
|
useBuiltIns: 'entry'
|
|
|
|
}
|
|
|
|
],
|
|
|
|
'@babel/preset-react'
|
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
'@babel/plugin-proposal-class-properties',
|
|
|
|
['@babel/plugin-proposal-object-rest-spread', { useBuiltIns: true }],
|
|
|
|
'lodash'
|
|
|
|
],
|
|
|
|
env: {
|
|
|
|
production: {
|
|
|
|
plugins: [
|
|
|
|
'@babel/plugin-syntax-dynamic-import',
|
|
|
|
'@babel/plugin-transform-react-constant-elements'
|
|
|
|
]
|
|
|
|
},
|
|
|
|
development: {
|
|
|
|
plugins: [
|
|
|
|
'@babel/plugin-syntax-dynamic-import',
|
|
|
|
'@babel/plugin-transform-react-jsx-source',
|
|
|
|
'@babel/plugin-transform-react-jsx-self'
|
|
|
|
]
|
|
|
|
},
|
|
|
|
test: {
|
|
|
|
plugins: [
|
|
|
|
'@babel/plugin-transform-modules-commonjs',
|
|
|
|
'dynamic-import-node',
|
|
|
|
'@babel/plugin-transform-react-jsx-source',
|
|
|
|
'@babel/plugin-transform-react-jsx-self'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|