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