babel-preset-react-app 8.0.0 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dependencies.js +28 -11
- package/package.json +2 -3
package/dependencies.js
CHANGED
@@ -84,17 +84,11 @@ module.exports = function(api, opts) {
|
|
84
84
|
// Latest stable ECMAScript features
|
85
85
|
require('@babel/preset-env').default,
|
86
86
|
{
|
87
|
-
//
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
// Users cannot override this behavior because this Babel
|
93
|
-
// configuration is highly tuned for ES5 support
|
94
|
-
ignoreBrowserslistConfig: true,
|
95
|
-
// If users import all core-js they're probably not concerned with
|
96
|
-
// bundle size. We shouldn't rely on magic to try and shrink it.
|
97
|
-
useBuiltIns: false,
|
87
|
+
// Allow importing core-js in entrypoint and use browserlist to select polyfills
|
88
|
+
useBuiltIns: 'entry',
|
89
|
+
// Set the corejs version we are using to avoid warnings in console
|
90
|
+
// This will need to change once we upgrade to corejs@3
|
91
|
+
corejs: 3,
|
98
92
|
// Do not transform modules to CJS
|
99
93
|
modules: false,
|
100
94
|
// Exclude transforms that make all code slower
|
@@ -103,6 +97,29 @@ module.exports = function(api, opts) {
|
|
103
97
|
],
|
104
98
|
].filter(Boolean),
|
105
99
|
plugins: [
|
100
|
+
// Necessary to include regardless of the environment because
|
101
|
+
// in practice some other transforms (such as object-rest-spread)
|
102
|
+
// don't work without it: https://github.com/babel/babel/issues/7215
|
103
|
+
[
|
104
|
+
require('@babel/plugin-transform-destructuring').default,
|
105
|
+
{
|
106
|
+
// Use loose mode for performance:
|
107
|
+
// https://github.com/facebook/create-react-app/issues/5602
|
108
|
+
loose: false,
|
109
|
+
selectiveLoose: [
|
110
|
+
'useState',
|
111
|
+
'useEffect',
|
112
|
+
'useContext',
|
113
|
+
'useReducer',
|
114
|
+
'useCallback',
|
115
|
+
'useMemo',
|
116
|
+
'useRef',
|
117
|
+
'useImperativeHandle',
|
118
|
+
'useLayoutEffect',
|
119
|
+
'useDebugValue',
|
120
|
+
],
|
121
|
+
},
|
122
|
+
],
|
106
123
|
// Polyfills the runtime needed for async/await, generators, and friends
|
107
124
|
// https://babeljs.io/docs/en/babel-plugin-transform-runtime
|
108
125
|
[
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "babel-preset-react-app",
|
3
|
-
"version": "
|
3
|
+
"version": "9.0.0",
|
4
4
|
"description": "Babel preset used by Create React App",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -39,6 +39,5 @@
|
|
39
39
|
"babel-plugin-dynamic-import-node": "2.2.0",
|
40
40
|
"babel-plugin-macros": "2.5.1",
|
41
41
|
"babel-plugin-transform-react-remove-prop-types": "0.4.24"
|
42
|
-
}
|
43
|
-
"gitHead": "265c1592dcf3853122dcdd50e1bfc1e43f697fbe"
|
42
|
+
}
|
44
43
|
}
|