babel-preset-react-app 9.1.0-next.62 → 9.1.2
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/create.js +31 -37
- package/dependencies.js +27 -28
- package/package.json +16 -17
package/create.js
CHANGED
@@ -117,29 +117,29 @@ module.exports = function(api, opts, env) {
|
|
117
117
|
// Experimental macros support. Will be documented after it's had some time
|
118
118
|
// in the wild.
|
119
119
|
require('babel-plugin-macros'),
|
120
|
-
//
|
121
|
-
//
|
122
|
-
//
|
123
|
-
[
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
],
|
120
|
+
// Disabled as it's handled automatically by preset-env, and `selectiveLoose` isn't
|
121
|
+
// yet merged into babel: https://github.com/babel/babel/pull/9486
|
122
|
+
// Related: https://github.com/facebook/create-react-app/pull/8215
|
123
|
+
// [
|
124
|
+
// require('@babel/plugin-transform-destructuring').default,
|
125
|
+
// {
|
126
|
+
// // Use loose mode for performance:
|
127
|
+
// // https://github.com/facebook/create-react-app/issues/5602
|
128
|
+
// loose: false,
|
129
|
+
// selectiveLoose: [
|
130
|
+
// 'useState',
|
131
|
+
// 'useEffect',
|
132
|
+
// 'useContext',
|
133
|
+
// 'useReducer',
|
134
|
+
// 'useCallback',
|
135
|
+
// 'useMemo',
|
136
|
+
// 'useRef',
|
137
|
+
// 'useImperativeHandle',
|
138
|
+
// 'useLayoutEffect',
|
139
|
+
// 'useDebugValue',
|
140
|
+
// ],
|
141
|
+
// },
|
142
|
+
// ],
|
143
143
|
// Turn on legacy decorators for TypeScript files
|
144
144
|
isTypeScriptEnabled && [
|
145
145
|
require('@babel/plugin-proposal-decorators').default,
|
@@ -154,15 +154,8 @@ module.exports = function(api, opts, env) {
|
|
154
154
|
loose: true,
|
155
155
|
},
|
156
156
|
],
|
157
|
-
//
|
158
|
-
|
159
|
-
// { ...todo, completed: true }
|
160
|
-
[
|
161
|
-
require('@babel/plugin-proposal-object-rest-spread').default,
|
162
|
-
{
|
163
|
-
useBuiltIns: true,
|
164
|
-
},
|
165
|
-
],
|
157
|
+
// Adds Numeric Separators
|
158
|
+
require('@babel/plugin-proposal-numeric-separator').default,
|
166
159
|
// Polyfills the runtime needed for async/await, generators, and friends
|
167
160
|
// https://babeljs.io/docs/en/babel-plugin-transform-runtime
|
168
161
|
[
|
@@ -192,11 +185,12 @@ module.exports = function(api, opts, env) {
|
|
192
185
|
removeImport: true,
|
193
186
|
},
|
194
187
|
],
|
195
|
-
//
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
188
|
+
// Optional chaining and nullish coalescing are supported in @babel/preset-env,
|
189
|
+
// but not yet supported in webpack due to support missing from acorn.
|
190
|
+
// These can be removed once webpack has support.
|
191
|
+
// See https://github.com/facebook/create-react-app/issues/8445#issuecomment-588512250
|
192
|
+
require('@babel/plugin-proposal-optional-chaining').default,
|
193
|
+
require('@babel/plugin-proposal-nullish-coalescing-operator').default,
|
200
194
|
].filter(Boolean),
|
201
195
|
overrides: [
|
202
196
|
isFlowEnabled && {
|
package/dependencies.js
CHANGED
@@ -97,29 +97,29 @@ module.exports = function(api, opts) {
|
|
97
97
|
],
|
98
98
|
].filter(Boolean),
|
99
99
|
plugins: [
|
100
|
-
//
|
101
|
-
//
|
102
|
-
//
|
103
|
-
[
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
],
|
100
|
+
// Disabled as it's handled automatically by preset-env, and `selectiveLoose` isn't
|
101
|
+
// yet merged into babel: https://github.com/babel/babel/pull/9486
|
102
|
+
// Related: https://github.com/facebook/create-react-app/pull/8215
|
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
|
+
// ],
|
123
123
|
// Polyfills the runtime needed for async/await, generators, and friends
|
124
124
|
// https://babeljs.io/docs/en/babel-plugin-transform-runtime
|
125
125
|
[
|
@@ -127,6 +127,10 @@ module.exports = function(api, opts) {
|
|
127
127
|
{
|
128
128
|
corejs: false,
|
129
129
|
helpers: areHelpersEnabled,
|
130
|
+
// By default, babel assumes babel/runtime version 7.0.0-beta.0,
|
131
|
+
// explicitly resolving to match the provided helper functions.
|
132
|
+
// https://github.com/babel/babel/issues/10261
|
133
|
+
version: require('@babel/runtime/package.json').version,
|
130
134
|
regenerator: true,
|
131
135
|
// https://babeljs.io/docs/en/babel-plugin-transform-runtime#useesmodules
|
132
136
|
// We should turn this on once the lowest version of Node LTS
|
@@ -138,11 +142,6 @@ module.exports = function(api, opts) {
|
|
138
142
|
absoluteRuntime: absoluteRuntimePath,
|
139
143
|
},
|
140
144
|
],
|
141
|
-
// Adds syntax support for import()
|
142
|
-
require('@babel/plugin-syntax-dynamic-import').default,
|
143
|
-
isEnvTest &&
|
144
|
-
// Transform dynamic import to require
|
145
|
-
require('babel-plugin-dynamic-import-node'),
|
146
145
|
].filter(Boolean),
|
147
146
|
};
|
148
147
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "babel-preset-react-app",
|
3
|
-
"version": "9.1.
|
3
|
+
"version": "9.1.2",
|
4
4
|
"description": "Babel preset used by Create React App",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -21,22 +21,21 @@
|
|
21
21
|
"test.js"
|
22
22
|
],
|
23
23
|
"dependencies": {
|
24
|
-
"@babel/core": "7.
|
25
|
-
"@babel/plugin-proposal-class-properties": "7.
|
26
|
-
"@babel/plugin-proposal-decorators": "7.
|
27
|
-
"@babel/plugin-proposal-
|
28
|
-
"@babel/plugin-
|
29
|
-
"@babel/plugin-
|
30
|
-
"@babel/plugin-transform-flow-strip-types": "7.
|
31
|
-
"@babel/plugin-transform-react-display-name": "7.
|
32
|
-
"@babel/plugin-transform-runtime": "7.
|
33
|
-
"@babel/preset-env": "7.
|
34
|
-
"@babel/preset-react": "7.
|
35
|
-
"@babel/preset-typescript": "7.
|
36
|
-
"@babel/runtime": "7.
|
37
|
-
"babel-plugin-
|
38
|
-
"babel-plugin-macros": "2.6.1",
|
24
|
+
"@babel/core": "7.9.0",
|
25
|
+
"@babel/plugin-proposal-class-properties": "7.8.3",
|
26
|
+
"@babel/plugin-proposal-decorators": "7.8.3",
|
27
|
+
"@babel/plugin-proposal-nullish-coalescing-operator": "7.8.3",
|
28
|
+
"@babel/plugin-proposal-numeric-separator": "7.8.3",
|
29
|
+
"@babel/plugin-proposal-optional-chaining": "7.9.0",
|
30
|
+
"@babel/plugin-transform-flow-strip-types": "7.9.0",
|
31
|
+
"@babel/plugin-transform-react-display-name": "7.8.3",
|
32
|
+
"@babel/plugin-transform-runtime": "7.9.0",
|
33
|
+
"@babel/preset-env": "7.9.0",
|
34
|
+
"@babel/preset-react": "7.9.1",
|
35
|
+
"@babel/preset-typescript": "7.9.0",
|
36
|
+
"@babel/runtime": "7.9.0",
|
37
|
+
"babel-plugin-macros": "2.8.0",
|
39
38
|
"babel-plugin-transform-react-remove-prop-types": "0.4.24"
|
40
39
|
},
|
41
|
-
"gitHead": "
|
40
|
+
"gitHead": "d2f813f8897ffcd2f0b0d2da75d0c44924c92f4d"
|
42
41
|
}
|