-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
vite-wasm-plugin does not work with serviceworker #655
Comments
configured plugins should be added to Vite's plugins entry, we need another entry |
does the sw work running the app via local preview? what's the top level await plugin? I'm going to add a new |
@ffreddow do you have a reproduction where I can test the changes? |
@ffreddow can you test with new |
I created reproduction repository (https://github.com/ffreddow/vite-pwa-plugins-reproduction). |
You need to register both plugins in vite and inject manifest vite plugins: in dev, the pwa plugin will use vite (no build) and so you need both plugins in vite, on build, pwa plugon will use a new vite build from the api, the build will not use main vite plugins it will use the configured inject manifest vite plugins |
When trying to build a service worker that imports Webassembly I get the same error as if vite-plugin-wasm is not there:
Building for developement does not throw an error but there is no serviceworker present.
Without the wasm import everything works just fine.
The config looks like this:

Am I configuring this wrong, is it a problem with VietPWA or is it a problem with the wasm plugin.
The text was updated successfully, but these errors were encountered: