-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors updating to 3.0.0/3.0.1 with Svelte / Vite #2725
Comments
might wanna see #2724 i faced a similar issue i think it has something to with how the packages are being loaded )remember reading something briefly in the release on changes to javascript) not sure, but passing the PerspectivePlugin to my webpack config resolved the issue i think it might work out for you too. |
I’m using vite (which uses esbuild under the hood) rather than webpack, but I did try the esbuild plugin as well. Still didn’t have any luck unfortunately. As the authors have mentioned in a different thread, I think the plugins are just there to help reduce bundle size rather than being mandatory, so hopefully it’s just a config option I missing? |
Im not entirely sure, but in my case unless i added the plugin the build itself would fail this never happened before verson 3.0 i didnt use anything extra earlier. |
Vite uses esbuild only for dev builds to pre-bundle not for prod builds, instead it uses rollup instead see: https://vitejs.dev/guide/why.html#why-not-bundle-with-esbuild
|
I'm also having this issue. Have you managed to find a fix? Including PerspectiveEsbuildPlugin in vite plugins did not help. |
I found a potential workaround using the latest perspective v3.1.2 inline builds with vite, can see an example stackblitz in the comment here: #2796 (comment) |
I managed to get it working by making those changes but unfortunately it then gives me a bunch of typing errors, so it's only a partial fix. This at least seems to confirm something is not right with the exports though so would be great if @texodus or someone else can come up with a fix. |
Version 3 is simply not compatible with Vite. Vite requires all WebAssembly modules to be imported with either the Source for wasm arguments: vitejs/vite#8219 |
Fetching wasm using URL relative to |
could you please provide a code snippet regarding this ? as well as the vite.config file? It would help a lot in trobleshooting |
Bug Report
Using Svelte / Vite and upgrading from v2 to v3, I get a strange import error.
Issue is reproduced in this repo:
https://github.com/marklbarlow/perspective-svelte
with the changes for v3 in this commit:
marklbarlow/perspective-svelte@7b262c5
What am I missing?
The text was updated successfully, but these errors were encountered: