babel-preset-react-app 9.1.0-next.61 → 9.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/create.js +25 -37
- package/dependencies.js +27 -28
- package/package.json +14 -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,6 @@ module.exports = function(api, opts, env) {
|
|
192
185
|
removeImport: true,
|
193
186
|
},
|
194
187
|
],
|
195
|
-
// Adds syntax support for import()
|
196
|
-
require('@babel/plugin-syntax-dynamic-import').default,
|
197
|
-
isEnvTest &&
|
198
|
-
// Transform dynamic import to require
|
199
|
-
require('babel-plugin-dynamic-import-node'),
|
200
188
|
].filter(Boolean),
|
201
189
|
overrides: [
|
202
190
|
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.1",
|
4
4
|
"description": "Babel preset used by Create React App",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -21,22 +21,19 @@
|
|
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-transform-
|
30
|
-
"@babel/plugin-transform-
|
31
|
-
"@babel/
|
32
|
-
"@babel/
|
33
|
-
"@babel/preset-
|
34
|
-
"@babel/
|
35
|
-
"
|
36
|
-
"@babel/runtime": "7.6.0",
|
37
|
-
"babel-plugin-dynamic-import-node": "2.3.0",
|
38
|
-
"babel-plugin-macros": "2.6.1",
|
24
|
+
"@babel/core": "7.8.4",
|
25
|
+
"@babel/plugin-proposal-class-properties": "7.8.3",
|
26
|
+
"@babel/plugin-proposal-decorators": "7.8.3",
|
27
|
+
"@babel/plugin-proposal-numeric-separator": "7.8.3",
|
28
|
+
"@babel/plugin-transform-flow-strip-types": "7.8.3",
|
29
|
+
"@babel/plugin-transform-react-display-name": "7.8.3",
|
30
|
+
"@babel/plugin-transform-runtime": "7.8.3",
|
31
|
+
"@babel/preset-env": "7.8.4",
|
32
|
+
"@babel/preset-react": "7.8.3",
|
33
|
+
"@babel/preset-typescript": "7.8.3",
|
34
|
+
"@babel/runtime": "7.8.4",
|
35
|
+
"babel-plugin-macros": "2.8.0",
|
39
36
|
"babel-plugin-transform-react-remove-prop-types": "0.4.24"
|
40
37
|
},
|
41
|
-
"gitHead": "
|
38
|
+
"gitHead": "d7c68420f7ca1c03b50a2c6b9ecd9c7bf94a10f6"
|
42
39
|
}
|