Repository navigation
Commit 34fe2f4
fix(example): load the runtime components entry so iOS dev builds start
The root tsconfig maps react-native-css/* to ./src/*, so the example's
Metro resolved react-native-css/components to src/components/index.ts,
the types-only entry. Babel compiles its `export * from "react-native"`
into __esModule getters, and Fast Refresh reads every one, including
PushNotificationIOS. Its native module isn't linked by default, so iOS's
NativeEventEmitter threw and the app crashed at startup.
Redirect that resolution to src/components/index.cts, the lazy CommonJS
entry the package's exports map already gives apps, and add cts to
sourceExts so Metro tracks it. Published installs were never affected.1 parent f4d18b0 commit 34fe2f4
1 file changed
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
22 | 48 | | |
23 | 49 | | |
24 | 50 | | |
0 commit comments