Conflicts with `vite-plugin-pwa`
See original GitHub issueDescription
Here is what fakeHtml
looks like when using vite-plugin-pwa
.
<html> <head>
<script type="module" src="/@vite/client"></script>
<link rel="manifest" href="/manifest.webmanifest"></head><body><script type="module" src="/@vite-plugin-pwa/pwa-entry-point-loaded"></script></body></html>
It is worth noting that I’m using solid with streams. Removing vite-plugin-pwa
bypasses the issue.
Error Stack
Error: [vite-plugin-ssr@0.4.13][Wrong Usage] You are using a Vite Plugin that transforms the HTML in a way that conflicts with vite-plugin-ssr. Create a new GitHub ticket to discuss a solution.
at null.getViteDevScripts (/home/magne/workspace/website-patch-notes/node_modules/.pnpm/vite-plugin-ssr@0.4.13_vite@3.0.3/node_modules/vite-plugin-ssr/dist/cjs/node/html/injectAssets/getViteDevScripts.js:16:17)
at runMicrotasks (<anonymous>)
at null.getMergedScriptTag (/home/magne/workspace/website-patch-notes/node_modules/.pnpm/vite-plugin-ssr@0.4.13_vite@3.0.3/node_modules/vite-plugin-ssr/dist/cjs/node/html/injectAssets.js:126:25)
at null.getHtmlSnippets (/home/magne/workspace/website-patch-notes/node_modules/.pnpm/vite-plugin-ssr@0.4.13_vite@3.0.3/node_modules/vite-plugin-ssr/dist/cjs/node/html/injectAssets.js:81:22)
at null.injectAtStreamBegin (/home/magne/workspace/website-patch-notes/node_modules/.pnpm/vite-plugin-ssr@0.4.13_vite@3.0.3/node_modules/vite-plugin-ssr/dist/cjs/node/html/injectAssets.js:46:24)
at null.injectStringAtBegin (/home/magne/workspace/website-patch-notes/node_modules/.pnpm/vite-plugin-ssr@0.4.13_vite@3.0.3/node_modules/vite-plugin-ssr/dist/cjs/node/html/renderHtml.js:79:24)
at null.<anonymous> (/home/magne/workspace/website-patch-notes/node_modules/.pnpm/vite-plugin-ssr@0.4.13_vite@3.0.3/node_modules/vite-plugin-ssr/dist/cjs/node/html/stream.js:213:49)
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Problems encountered in using vite plugin PWA in vue3 #349
Use vite plugin PWA in vue3. Every time you update the business code, vite will hot update and refresh the browser.
Read more >How to configure worker plugins in Vite 2.8 - LogRocket Blog
In this article, we'll explore how to properly configure worker plugins with Vite for a functional progressive web application (PWA).
Read more >Development | Guide - Vite PWA - Netlify
When using this strategy, the vite-plugin-pwa plugin will delegate the service worker compilation to Vite , so if you're using import statements ...
Read more >VitePWA plugin not updating generated icons in manifest
I am trying to build the site with vite and vite-plugin-pwa to use it as a pwa. The vite.config.js and the index.html are...
Read more >PWA in VUE VITE - DEV Community
InjectRegister Plugin Option: This configuration helps to control how to register the service worker in my application, although the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s a good point, yes we could whitelist
vite-plugin-pwa
for dev. For other HTML transformers we can show a warning instead of throwing an error.It’s not a trivial change, so I’ll implement this later. If someone wants that change, feel free to push by adding a comment here.
Yep that was actually the plan 😃.
Keep me updated and I’ll then improve the error message to link to this discussion.