Commit e1ca288
fix(exports): expose web chart builds via browser condition
The package ships web builds (skiaChart.web.js, svgChart.web.js) but the exports for ./skiaChart and ./svgChart only define a default condition pointing at the native build.
Subpath exports bypass a bundler's platform-extension resolution, so web bundlers (webpack, Vite, esbuild)
resolve the native entry, which pulls in react-native-svg and
react-native and fails on web.
Add a browser condition to both subpaths so web bundlers resolve the shipped .web.js build. Metro keeps using default for native, so native resolution is unchanged.
Signed-off-by: Ryan <4126720+ry-allan@users.noreply.github.com>1 parent 03704f3 commit e1ca288
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
0 commit comments