You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the expo & next.js starter from tamagui (source here).
And I ran into the following issue when using the SvgChart while running on "web" (Expo / React Native does work):
export * from './lib/module/svgChart';
^^^^^^
SyntaxError: Unexpected token 'export'
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1178:20)
at Module._compile (node:internal/modules/cjs/loader:1220:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
I am importing like this (so there is no problem with Skia):
import SvgChart, { SVGRenderer } from '@wuba/react-native-echarts/svgChart'
Also, I have tried to add the Webpack extensions to next.conf.js like explained here, but that did not work,
I also tried adding @wuba/react-native-echarts/svgChart to the transpilePackages Array, but that did not work either.
What am I doing wrong?
Thank you
The text was updated successfully, but these errors were encountered:
Thank you, but that won't be necessary. I finally found the solution!
In next.js I had to put the whole package name into the transpilePackages array, not just the .../svgChart.
So if anyone else has the same Problem, my next.config.js looks like this to make the package work:
Hi,
first of all, thank you for this lib!
I am using the expo & next.js starter from tamagui (source here).
And I ran into the following issue when using the
SvgChart
while running on "web" (Expo / React Native does work):I am importing like this (so there is no problem with Skia):
Also, I have tried to add the Webpack extensions to
next.conf.js
like explained here, but that did not work,I also tried adding
@wuba/react-native-echarts/svgChart
to thetranspilePackages
Array, but that did not work either.What am I doing wrong?
Thank you
The text was updated successfully, but these errors were encountered: