File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
packages/babel-preset-react-cy-app Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -81,14 +81,9 @@ if (env === 'test') {
81
81
} ;
82
82
83
83
if ( env === 'production' ) {
84
- // Optimization: hoist JSX that never changes out of render()
85
- // Disabled because of issues:
86
- // * https://github.com/facebookincubator/create-react-app/issues/525
87
- // * https://phabricator.babeljs.io/search/query/pCNlnC2xzwzx/
88
- // * https://github.com/babel/babel/issues/4516
89
- // TODO: Enable again when these issues are resolved.
90
- // plugins.push.apply(plugins, [
91
- // require.resolve('babel-plugin-transform-react-constant-elements')
92
- // ]);
84
+ plugins . push . apply ( plugins , [
85
+ // Reduces calls to `React.createElement` by hoisting static components to the top
86
+ require . resolve ( 'babel-plugin-transform-react-constant-elements' )
87
+ ] ) ;
93
88
}
94
89
}
You can’t perform that action at this time.
0 commit comments