babel-preset-expo 13.1.7 → 13.2.0-canary-20250428-4156f88
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/build/index.d.ts +1 -1
- package/build/index.js +2 -1
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -150,7 +150,7 @@ Changes the engine preset in `@react-native/babel-preset` based on the JavaScrip
|
|
|
150
150
|
|
|
151
151
|
### `unstable_transformImportMeta`
|
|
152
152
|
|
|
153
|
-
Enable that transform that converts `import.meta` to `globalThis.__ExpoImportMetaRegistry`, defaults to `false
|
|
153
|
+
Enable that transform that converts `import.meta` to `globalThis.__ExpoImportMetaRegistry`, defaults to `false` in client bundles and `true` for server bundles.
|
|
154
154
|
|
|
155
155
|
> **Note:** Use this option at your own risk. If the JavaScript engine supports `import.meta` natively, this transformation may interfere with the native implementation.
|
|
156
156
|
|
package/build/index.d.ts
CHANGED
|
@@ -72,7 +72,7 @@ type BabelPresetExpoPlatformOptions = {
|
|
|
72
72
|
*
|
|
73
73
|
* > **Note:** Use this option at your own risk. If the JavaScript engine supports `import.meta` natively, this transformation may interfere with the native implementation.
|
|
74
74
|
*
|
|
75
|
-
* @default `false`
|
|
75
|
+
* @default `false` on client and `true` on server.
|
|
76
76
|
*/
|
|
77
77
|
unstable_transformImportMeta?: boolean;
|
|
78
78
|
};
|
package/build/index.js
CHANGED
|
@@ -181,7 +181,8 @@ function babelPresetExpo(api, options = {}) {
|
|
|
181
181
|
if (platformOptions.disableImportExportTransform) {
|
|
182
182
|
extraPlugins.push([require('./detect-dynamic-exports').detectDynamicExports]);
|
|
183
183
|
}
|
|
184
|
-
|
|
184
|
+
const polyfillImportMeta = platformOptions.unstable_transformImportMeta ?? isServerEnv;
|
|
185
|
+
extraPlugins.push((0, import_meta_transform_plugin_1.expoImportMetaTransformPluginFactory)(polyfillImportMeta === true));
|
|
185
186
|
return {
|
|
186
187
|
presets: [
|
|
187
188
|
(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babel-preset-expo",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.2.0-canary-20250428-4156f88",
|
|
4
4
|
"description": "The Babel preset for Expo projects",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"files": [
|
|
@@ -76,8 +76,7 @@
|
|
|
76
76
|
"@babel/traverse": "^7.9.0",
|
|
77
77
|
"@babel/types": "^7.9.0",
|
|
78
78
|
"babel-plugin-react-compiler": "^19.0.0-beta-e993439-20250405",
|
|
79
|
-
"expo-module-scripts": "
|
|
79
|
+
"expo-module-scripts": "4.1.6-canary-20250428-4156f88",
|
|
80
80
|
"jest": "^29.2.1"
|
|
81
|
-
}
|
|
82
|
-
"gitHead": "3cd208465df78e385ca9380531bbbfe33ca68e81"
|
|
81
|
+
}
|
|
83
82
|
}
|