2018-05-28 01:16:05 +00:00
|
|
|
module.exports = {
|
|
|
|
presets: [
|
|
|
|
[
|
|
|
|
'@babel/preset-env',
|
|
|
|
{
|
|
|
|
modules: false,
|
|
|
|
loose: true
|
|
|
|
}
|
|
|
|
],
|
2018-08-12 21:19:17 +00:00
|
|
|
'@babel/preset-react'
|
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
'@babel/plugin-proposal-class-properties',
|
|
|
|
'@babel/plugin-proposal-export-default-from',
|
|
|
|
'@babel/plugin-proposal-export-namespace-from'
|
2018-05-28 01:16:05 +00:00
|
|
|
],
|
|
|
|
env: {
|
|
|
|
development: {
|
|
|
|
plugins: ['react-hot-loader/babel']
|
|
|
|
},
|
|
|
|
test: {
|
|
|
|
plugins: ['@babel/plugin-transform-modules-commonjs']
|
|
|
|
},
|
|
|
|
production: {
|
|
|
|
plugins: [
|
|
|
|
'@babel/plugin-transform-react-inline-elements',
|
|
|
|
'@babel/plugin-transform-react-constant-elements'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|