@react-native/babel-preset 0.74.0 → 0.74.1
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/package.json +3 -2
- package/src/configs/main.js +12 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native/babel-preset",
|
|
3
|
-
"version": "0.74.
|
|
3
|
+
"version": "0.74.1",
|
|
4
4
|
"description": "Babel preset for React Native applications",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"@babel/plugin-proposal-async-generator-functions": "^7.0.0",
|
|
19
19
|
"@babel/plugin-proposal-class-properties": "^7.18.0",
|
|
20
20
|
"@babel/plugin-proposal-export-default-from": "^7.0.0",
|
|
21
|
+
"@babel/plugin-proposal-logical-assignment-operators": "^7.18.0",
|
|
21
22
|
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.0",
|
|
22
23
|
"@babel/plugin-proposal-numeric-separator": "^7.0.0",
|
|
23
24
|
"@babel/plugin-proposal-object-rest-spread": "^7.20.0",
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
"@babel/plugin-transform-typescript": "^7.5.0",
|
|
54
55
|
"@babel/plugin-transform-unicode-regex": "^7.0.0",
|
|
55
56
|
"@babel/template": "^7.0.0",
|
|
56
|
-
"@react-native/babel-plugin-codegen": "
|
|
57
|
+
"@react-native/babel-plugin-codegen": "0.74.1",
|
|
57
58
|
"babel-plugin-transform-flow-enums": "^0.0.2",
|
|
58
59
|
"react-refresh": "^0.14.0"
|
|
59
60
|
},
|
package/src/configs/main.js
CHANGED
|
@@ -147,6 +147,18 @@ const getPreset = (src, options) => {
|
|
|
147
147
|
{loose: true},
|
|
148
148
|
]);
|
|
149
149
|
}
|
|
150
|
+
if (
|
|
151
|
+
!isHermes &&
|
|
152
|
+
(isNull ||
|
|
153
|
+
src.indexOf('??=') !== -1 ||
|
|
154
|
+
src.indexOf('||=') !== -1 ||
|
|
155
|
+
src.indexOf('&&=') !== -1)
|
|
156
|
+
) {
|
|
157
|
+
extraPlugins.push([
|
|
158
|
+
require('@babel/plugin-proposal-logical-assignment-operators'),
|
|
159
|
+
{loose: true},
|
|
160
|
+
]);
|
|
161
|
+
}
|
|
150
162
|
|
|
151
163
|
if (options && options.dev && !options.useTransformReactJSXExperimental) {
|
|
152
164
|
extraPlugins.push([require('@babel/plugin-transform-react-jsx-source')]);
|