babel-preset-react-app 10.0.0 → 11.0.0-next.104
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/README.md +1 -1
- package/create.js +18 -0
- package/package.json +18 -17
package/README.md
CHANGED
@@ -30,7 +30,7 @@ Then create a file named `.babelrc` with following contents in the root folder o
|
|
30
30
|
}
|
31
31
|
```
|
32
32
|
|
33
|
-
This preset uses the `useBuiltIns` option with [transform-object-rest-spread](
|
33
|
+
This preset uses the `useBuiltIns` option with [transform-object-rest-spread](https://babeljs.io/docs/plugins/transform-object-rest-spread/) and [transform-react-jsx](https://babeljs.io/docs/plugins/transform-react-jsx/), which assumes that `Object.assign` is available or polyfilled.
|
34
34
|
|
35
35
|
## Usage with Flow
|
36
36
|
|
package/create.js
CHANGED
@@ -146,12 +146,30 @@ module.exports = function (api, opts, env) {
|
|
146
146
|
// class { handleClick = () => { } }
|
147
147
|
// Enable loose mode to use assignment instead of defineProperty
|
148
148
|
// See discussion in https://github.com/facebook/create-react-app/issues/4263
|
149
|
+
// Note:
|
150
|
+
// 'loose' mode configuration must be the same for
|
151
|
+
// * @babel/plugin-proposal-class-properties
|
152
|
+
// * @babel/plugin-proposal-private-methods
|
153
|
+
// * @babel/plugin-proposal-private-property-in-object
|
154
|
+
// (when they are enabled)
|
149
155
|
[
|
150
156
|
require('@babel/plugin-proposal-class-properties').default,
|
151
157
|
{
|
152
158
|
loose: true,
|
153
159
|
},
|
154
160
|
],
|
161
|
+
[
|
162
|
+
require('@babel/plugin-proposal-private-methods').default,
|
163
|
+
{
|
164
|
+
loose: true,
|
165
|
+
},
|
166
|
+
],
|
167
|
+
[
|
168
|
+
require('@babel/plugin-proposal-private-property-in-object').default,
|
169
|
+
{
|
170
|
+
loose: true,
|
171
|
+
},
|
172
|
+
],
|
155
173
|
// Adds Numeric Separators
|
156
174
|
require('@babel/plugin-proposal-numeric-separator').default,
|
157
175
|
// Polyfills the runtime needed for async/await, generators, and friends
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "babel-preset-react-app",
|
3
|
-
"version": "
|
3
|
+
"version": "11.0.0-next.104+6a3315b7",
|
4
4
|
"description": "Babel preset used by Create React App",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -21,21 +21,22 @@
|
|
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-nullish-coalescing-operator": "7.
|
28
|
-
"@babel/plugin-proposal-numeric-separator": "7.
|
29
|
-
"@babel/plugin-proposal-optional-chaining": "7.
|
30
|
-
"@babel/plugin-
|
31
|
-
"@babel/plugin-transform-
|
32
|
-
"@babel/plugin-transform-
|
33
|
-
"@babel/
|
34
|
-
"@babel/preset-
|
35
|
-
"@babel/preset-
|
36
|
-
"@babel/
|
37
|
-
"babel
|
38
|
-
"babel-plugin-
|
24
|
+
"@babel/core": "^7.16.0",
|
25
|
+
"@babel/plugin-proposal-class-properties": "^7.16.0",
|
26
|
+
"@babel/plugin-proposal-decorators": "^7.16.4",
|
27
|
+
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
|
28
|
+
"@babel/plugin-proposal-numeric-separator": "^7.16.0",
|
29
|
+
"@babel/plugin-proposal-optional-chaining": "^7.16.0",
|
30
|
+
"@babel/plugin-proposal-private-methods": "^7.16.0",
|
31
|
+
"@babel/plugin-transform-flow-strip-types": "^7.16.0",
|
32
|
+
"@babel/plugin-transform-react-display-name": "^7.16.0",
|
33
|
+
"@babel/plugin-transform-runtime": "^7.16.4",
|
34
|
+
"@babel/preset-env": "^7.16.4",
|
35
|
+
"@babel/preset-react": "^7.16.0",
|
36
|
+
"@babel/preset-typescript": "^7.16.0",
|
37
|
+
"@babel/runtime": "^7.16.3",
|
38
|
+
"babel-plugin-macros": "^3.1.0",
|
39
|
+
"babel-plugin-transform-react-remove-prop-types": "^0.4.24"
|
39
40
|
},
|
40
|
-
"gitHead": "
|
41
|
+
"gitHead": "6a3315b73c19791cf485d3e53b7ff72a042014cb"
|
41
42
|
}
|