@tamagui/native-bundle 2.0.0-rc.33 → 2.0.0-rc.34-1774941075321

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 CHANGED
@@ -37,7 +37,14 @@ async function bundleNative(options) {
37
37
  "process.env.NODE_ENV": JSON.stringify("production"),
38
38
  "process.env.TAMAGUI_IS_CORE_NODE": JSON.stringify("1")
39
39
  };
40
- const external = isTest ? [/^react($|\/)/, /^react-native($|\/)/] : [/^react($|\/)/];
40
+ const external = isTest ? [/^react($|\/)/, /^react-native($|\/)/] : [
41
+ /^react($|\/)/,
42
+ /^react-native-reanimated($|\/)/,
43
+ /^react-native-worklets($|\/)/,
44
+ // Reanimated's internal code requires react-native/Libraries/Renderer/shims/ReactFabric
45
+ // which doesn't exist in the web bundle. Externalize it so the bundler doesn't try to resolve it.
46
+ /react-native\/Libraries\//
47
+ ];
41
48
  const alias = isTest ? [
42
49
  // Aliases don't work for pre-bundled deps, so we externalize and alias in vitest config
43
50
  ] : [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/native-bundle",
3
- "version": "2.0.0-rc.33",
3
+ "version": "2.0.0-rc.34-1774941075321",
4
4
  "description": "Vite-based bundler for creating native CommonJS bundles for Tamagui packages",
5
5
  "license": "MIT",
6
6
  "author": {
package/src/index.ts CHANGED
@@ -94,7 +94,16 @@ export async function bundleNative(options: BundleOptions): Promise<void> {
94
94
  // For test bundles, bundle a fake react-native implementation
95
95
  // For production bundles, bundle react-native-web-lite
96
96
  // Note: react and all its subpaths (jsx-runtime, compiler-runtime, etc.) must be external
97
- const external = isTest ? [/^react($|\/)/, /^react-native($|\/)/] : [/^react($|\/)/]
97
+ const external = isTest
98
+ ? [/^react($|\/)/, /^react-native($|\/)/]
99
+ : [
100
+ /^react($|\/)/,
101
+ /^react-native-reanimated($|\/)/,
102
+ /^react-native-worklets($|\/)/,
103
+ // Reanimated's internal code requires react-native/Libraries/Renderer/shims/ReactFabric
104
+ // which doesn't exist in the web bundle. Externalize it so the bundler doesn't try to resolve it.
105
+ /react-native\/Libraries\//,
106
+ ]
98
107
  const alias = isTest
99
108
  ? [
100
109
  // Aliases don't work for pre-bundled deps, so we externalize and alias in vitest config