Skip to content

Commit 449a812

Browse files
authored
Disable Symbol typeof transform (#5278)
1 parent b3947e1 commit 449a812

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/babel-preset-react-app/create.js

+2
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ module.exports = function(api, opts, env) {
8282
useBuiltIns: false,
8383
// Do not transform modules to CJS
8484
modules: false,
85+
// Exclude transforms that make all code slower
86+
exclude: ['transform-typeof-symbol'],
8587
},
8688
],
8789
[

packages/babel-preset-react-app/dependencies.js

+4
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ module.exports = function(api, opts) {
7676
},
7777
// Do not transform modules to CJS
7878
modules: false,
79+
// Exclude transforms that make all code slower
80+
exclude: ['transform-typeof-symbol'],
7981
},
8082
],
8183
(isEnvProduction || isEnvDevelopment) && [
@@ -95,6 +97,8 @@ module.exports = function(api, opts) {
9597
useBuiltIns: false,
9698
// Do not transform modules to CJS
9799
modules: false,
100+
// Exclude transforms that make all code slower
101+
exclude: ['transform-typeof-symbol'],
98102
},
99103
],
100104
].filter(Boolean),

0 commit comments

Comments
 (0)