Closed chaoky closed 1 year ago
One way to fix this is by adding the following to your vite.config.ts
:
ssr: {
noExternal: "@typeform/embed-react",
}
Another possible solution could be to play with build.rollupOptions.defaultIsModuleExports but I haven't tried this yet.
I came across this while migrating a project from Astro, I imagine that it comes from Vite trying to optimise deps, but I'm not sure
https://github.com/Typeform/embed/tree/main/packages/embed-react
only works in dev mode
only works at build time
works at build time and dev mode
error sample: