2019-04-13 03:25:58 +00:00
|
|
|
const loose = true;
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
plugins: [
|
|
|
|
// Stage 1
|
|
|
|
'@babel/plugin-proposal-export-default-from',
|
|
|
|
['@babel/plugin-proposal-optional-chaining', { loose }],
|
|
|
|
['@babel/plugin-proposal-nullish-coalescing-operator', { loose }],
|
|
|
|
|
|
|
|
// Stage 2
|
|
|
|
'@babel/plugin-proposal-export-namespace-from',
|
|
|
|
|
|
|
|
// Stage 3
|
|
|
|
['@babel/plugin-proposal-class-properties', { loose }],
|
|
|
|
'@babel/plugin-syntax-dynamic-import'
|
|
|
|
],
|
|
|
|
env: {
|
|
|
|
development: {
|
|
|
|
presets: [
|
2023-01-06 02:43:51 +00:00
|
|
|
['@babel/preset-react', { development: true }],
|
|
|
|
'@babel/preset-typescript'
|
2019-04-13 03:25:58 +00:00
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
'babel-plugin-inline-classnames'
|
|
|
|
]
|
|
|
|
},
|
|
|
|
production: {
|
|
|
|
presets: [
|
2023-01-06 02:43:51 +00:00
|
|
|
'@babel/preset-react',
|
|
|
|
'@babel/preset-typescript'
|
2019-04-13 03:25:58 +00:00
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
'babel-plugin-transform-react-remove-prop-types'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|