Babel: @babel/plugin-transform-react-constant-elements to babel config to optimize react performance (#32629)

This commit is contained in:
Torkel Ödegaard 2021-04-06 09:24:19 +02:00 committed by GitHub
parent 6087980de0
commit 532b8d4bc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,8 +39,7 @@ module.exports = function getBabelConfig(options = {}) {
['@babel/plugin-proposal-class-properties', { loose: true }],
['@babel/plugin-proposal-private-methods', { loose: true }],
['@babel/plugin-proposal-object-rest-spread', { loose: true }],
// Waiting with this need to refactoring timeSrv & locationUtil.init
// '@babel/plugin-transform-react-constant-elements',
'@babel/plugin-transform-react-constant-elements',
'@babel/plugin-proposal-nullish-coalescing-operator',
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-syntax-dynamic-import', // needed for `() => import()` in routes.ts