-
Notifications
You must be signed in to change notification settings - Fork 91
Open
Labels
Description
Which Platforms?
Both
Which React Native Version?
0.81.5
Which @braze/react-native-sdk SDK version?
18.0.0
Repro Rate
100%
Steps To Reproduce
The code bunding fails when a project has Expo API Routes.
Minimal repro project: https://github.com/Nezz/expo-repro/tree/repro/Braze
Steps:
- Run
bun install - Run
bun expo export:embed --eager --platform ios --dev false
Expected Behavior
The code bunding should work
Actual Incorrect Behavior
Bundling the code fails:
Error: Importing native-only module "react-native/Libraries/Utilities/codegenNativeComponent" on web from: node_modules/@braze/react-native-sdk/src/specs/BrazeBannerViewNativeComponent.ts
Import stack:
node_modules/@braze/react-native-sdk/src/specs/BrazeBannerViewNativeComponent.ts
| import "react-native/Libraries/Utilities/codegenNativeComponent"
^ Importing react-native internals is not supported on web.
node_modules/@braze/react-native-sdk/src/ui/braze-banner-view.js
| import "../specs/BrazeBannerViewNativeComponent"
node_modules/@braze/react-native-sdk/src/braze.js
| import "./ui/braze-banner-view"
node_modules/@braze/react-native-sdk/src/index.js
| import "./braze"
app/(tabs)/index.tsx
| import "@braze/react-native-sdk"
Verbose Logs
Additional Information
It'd be nice to provide a polyfill for web for this to work out of the box
Reactions are currently unavailable