babel-preset-react-app-new 1.0.2 → 1.0.3
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 +14 -5
- package/package.json +12 -9
package/create.js
CHANGED
|
@@ -30,6 +30,7 @@ module.exports = function (api, opts, env) {
|
|
|
30
30
|
var isEnvTest = env === 'test';
|
|
31
31
|
|
|
32
32
|
var useESModules = validateBoolOption('useESModules', opts.useESModules, isEnvDevelopment || isEnvProduction);
|
|
33
|
+
var isFlowEnabled = validateBoolOption('flow', opts.flow, true);
|
|
33
34
|
var isTypeScriptEnabled = validateBoolOption('typescript', opts.typescript, true);
|
|
34
35
|
var areHelpersEnabled = validateBoolOption('helpers', opts.helpers, true);
|
|
35
36
|
var useAbsoluteRuntime = validateBoolOption('absoluteRuntime', opts.absoluteRuntime, true);
|
|
@@ -56,11 +57,6 @@ module.exports = function (api, opts, env) {
|
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
return {
|
|
59
|
-
assumptions: {
|
|
60
|
-
setPublicClassFields: true,
|
|
61
|
-
privateFieldsAsProperties: true,
|
|
62
|
-
setPublicClassFields: true
|
|
63
|
-
},
|
|
64
60
|
presets: [
|
|
65
61
|
isEnvTest && [
|
|
66
62
|
// ES features necessary for user's Node version
|
|
@@ -102,6 +98,19 @@ module.exports = function (api, opts, env) {
|
|
|
102
98
|
].filter(Boolean),
|
|
103
99
|
plugins: [
|
|
104
100
|
[require('@babel/plugin-proposal-decorators').default, { legacy: true }],
|
|
101
|
+
[
|
|
102
|
+
require('@babel/plugin-transform-class-properties').default,
|
|
103
|
+
{
|
|
104
|
+
loose: true
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
[require('@babel/plugin-transform-private-methods').default, { loose: true }],
|
|
108
|
+
[
|
|
109
|
+
require('@babel/plugin-proposal-private-property-in-object').default,
|
|
110
|
+
{
|
|
111
|
+
loose: true
|
|
112
|
+
}
|
|
113
|
+
],
|
|
105
114
|
// Polyfills the runtime needed for async/await, generators, and friends
|
|
106
115
|
// https://babeljs.io/docs/en/babel-plugin-transform-runtime
|
|
107
116
|
[
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babel-preset-react-app-new",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Babel preset used by Create React App",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "
|
|
7
|
+
"url": "https://github.com/facebook/create-react-app.git",
|
|
8
8
|
"directory": "packages/babel-preset-react-app"
|
|
9
9
|
},
|
|
10
10
|
"license": "MIT",
|
|
@@ -21,12 +21,15 @@
|
|
|
21
21
|
"test.js"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@babel/core": "^7.
|
|
25
|
-
"@babel/plugin-proposal-decorators": "^7.
|
|
26
|
-
"@babel/plugin-
|
|
27
|
-
"@babel/
|
|
28
|
-
"@babel/
|
|
29
|
-
"@babel/
|
|
30
|
-
"@babel/
|
|
24
|
+
"@babel/core": "^7.24.5",
|
|
25
|
+
"@babel/plugin-proposal-decorators": "^7.24.1",
|
|
26
|
+
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
|
27
|
+
"@babel/plugin-transform-class-properties": "^7.24.1",
|
|
28
|
+
"@babel/plugin-transform-private-methods": "^7.24.1",
|
|
29
|
+
"@babel/plugin-transform-runtime": "^7.24.3",
|
|
30
|
+
"@babel/preset-env": "^7.24.5",
|
|
31
|
+
"@babel/preset-react": "^7.24.1",
|
|
32
|
+
"@babel/preset-typescript": "^7.24.1",
|
|
33
|
+
"@babel/runtime": "^7.24.5"
|
|
31
34
|
}
|
|
32
35
|
}
|