@tamagui/native-bundle 2.0.0-1768530912818 → 2.0.0-1768636514428
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/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/index.ts +4 -1
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ async function bundleNative(options) {
|
|
|
28
28
|
"process.env.NODE_ENV": JSON.stringify("production"),
|
|
29
29
|
"process.env.TAMAGUI_IS_CORE_NODE": JSON.stringify("1")
|
|
30
30
|
};
|
|
31
|
-
const external = isTest ? [
|
|
31
|
+
const external = isTest ? [/^react($|\/)/, /^react-native($|\/)/] : [/^react($|\/)/];
|
|
32
32
|
const alias = isTest ? [
|
|
33
33
|
// Aliases don't work for pre-bundled deps, so we externalize and alias in vitest config
|
|
34
34
|
] : [
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -83,7 +83,10 @@ export async function bundleNative(options: BundleOptions): Promise<void> {
|
|
|
83
83
|
|
|
84
84
|
// For test bundles, bundle a fake react-native implementation
|
|
85
85
|
// For production bundles, bundle react-native-web-lite
|
|
86
|
-
|
|
86
|
+
// Note: react and all its subpaths (jsx-runtime, compiler-runtime, etc.) must be external
|
|
87
|
+
const external = isTest
|
|
88
|
+
? [/^react($|\/)/, /^react-native($|\/)/]
|
|
89
|
+
: [/^react($|\/)/]
|
|
87
90
|
const alias = isTest
|
|
88
91
|
? [
|
|
89
92
|
// Aliases don't work for pre-bundled deps, so we externalize and alias in vitest config
|