From 91cb93a1e7ca527670b6f42ce20b7248a896cd49 Mon Sep 17 00:00:00 2001 From: Cedric van Putten Date: Wed, 21 Feb 2024 14:39:56 +0100 Subject: [PATCH] fix: add codegen native component as external --- runtime/src/aliases/index.tsx | 1 + snackager/src/bundler/externals.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/runtime/src/aliases/index.tsx b/runtime/src/aliases/index.tsx index c323996c..3050fda3 100644 --- a/runtime/src/aliases/index.tsx +++ b/runtime/src/aliases/index.tsx @@ -21,6 +21,7 @@ const aliases: { [key: string]: any } = { 'react-native/Libraries/Utilities/PolyfillFunctions': require('react-native/Libraries/Utilities/PolyfillFunctions'), // Used by @sentry/react-native@3.4.2 'react-native/Libraries/Utilities/codegenNativeCommands': require('react-native/Libraries/Utilities/codegenNativeCommands'), // Used by react-native-webview@11.23.0 'react-native/Libraries/NativeComponent/NativeComponentRegistry': require('react-native/Libraries/NativeComponent/NativeComponentRegistry'), // Used by @shopify/react-native-skia@0.1.221 + 'react-native/Libraries/Utilities/codegenNativeComponent': require('react-native/Libraries/Utilities/codegenNativeComponent'), // Used by react-native-svg // Does not work in Snackager, likely due to Webpack / Codegen 'react-native-pager-view': require('react-native-pager-view'), diff --git a/snackager/src/bundler/externals.ts b/snackager/src/bundler/externals.ts index 500c1ac3..9cd75597 100644 --- a/snackager/src/bundler/externals.ts +++ b/snackager/src/bundler/externals.ts @@ -34,6 +34,7 @@ const CORE_EXTERNALS = [ 'react-native-web/dist/modules/UnimplementedView', // Used by react-native-maps 'react-native/Libraries/Utilities/codegenNativeCommands', // Used by react-native-webview@11.23.0 'react-native/Libraries/NativeComponent/NativeComponentRegistry', // Used by `@shopify/react-native-skia@0.1.238` + 'react-native/Libraries/Utilities/codegenNativeComponent', // Used by react-native-svg 'metro', // Used by expo-router // TODO: decide whether to treat prop-types as an external or not // previously it was always installed as a dependency and not treated as an external.