File tree 1 file changed +8
-11
lines changed
packages/babel-preset-react-app 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -46,16 +46,13 @@ module.exports = function(api, opts) {
46
46
// Latest stable ECMAScript features
47
47
require ( '@babel/preset-env' ) . default ,
48
48
{
49
- targets : {
50
- // React parses on ie 9, so we should too
51
- ie : 9 ,
52
- } ,
53
- // We currently minify with uglify
54
- // Remove after https://github.com/mishoo/UglifyJS2/issues/448
55
- forceAllTransforms : true ,
56
- // Disable polyfill transforms
57
- useBuiltIns : false ,
58
- // Do not transform modules to CJS
49
+ // `entry` transforms `@babel/polyfill` into individual requires for
50
+ // the targeted browsers. This is safer than `usage` which performs
51
+ // static code analysis to determine what's required.
52
+ // This is probably a fine default to help trim down bundles when
53
+ // end-users inevitably import '@babel/polyfill'.
54
+ useBuiltIns : 'entry' ,
55
+ // Do not transform modules to CJS.
59
56
modules : false ,
60
57
} ,
61
58
] ,
@@ -104,7 +101,7 @@ module.exports = function(api, opts) {
104
101
! isEnvTest && [
105
102
require ( '@babel/plugin-transform-regenerator' ) . default ,
106
103
{
107
- // Async functions are converted to generators by babel- preset-env
104
+ // Async functions are converted to generators by @ babel/ preset-env
108
105
async : false ,
109
106
} ,
110
107
] ,
You can’t perform that action at this time.
0 commit comments