babel.config.js
1 module.exports = { 2 presets: [ 3 [ 4 '@babel/preset-env', 5 { 6 modules: false, 7 }, 8 ], 9 '@babel/preset-react', 10 ], 11 plugins: [ 12 '@babel/plugin-proposal-class-properties', 13 '@babel/plugin-syntax-dynamic-import', 14 ], 15 env: { 16 production: { 17 only: ['app'], 18 plugins: [ 19 'lodash', 20 'transform-react-remove-prop-types', 21 '@babel/plugin-transform-react-inline-elements', 22 '@babel/plugin-transform-react-constant-elements', 23 ], 24 }, 25 test: { 26 plugins: [ 27 '@babel/plugin-transform-modules-commonjs', 28 'dynamic-import-node', 29 ], 30 }, 31 }, 32 };