-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Inject Register script or inline has no effect on output HTML. #55
Comments
@sksar on SvelteKit there is no entry point (like on Vite: index.html), and so you will need to inject it manually or using virtual pwa script: check the examples ( |
@userquin The code given here https://vite-pwa-org.netlify.app/frameworks/sveltekit.html#sveltekit-pwa-plugin, did not have any effect as well. No manifest headers. (I put the code in the +layout.svelte as given on the docs) |
Just encountered exactly the same. The trick seems to lie here (you might want to ignore lines 7-10 for initial testing): sveltekit/examples/sveltekit-ts/src/routes/+layout.svelte Lines 5 to 18 in 19442a0
With those few lines (and properly refreshing my SW afterward), everything seems to be generated as expected. This should really be documented somewhere. Also, we should maybe check if there is a better way for doing, because that kinda adds a lot of configs to a "Zero-config PWA Plugin for SvelteKit" |
I updated docs yesterday: virtual pwa info PR welcome to include some reference in Kit docs. |
Sure! Could you give me a hint where to find the docs as source code? I could not find a link on the page directly |
Docs can be found here: https://github.com/vite-pwa/docs, read contributing guide, we're using pnpm as package manager and requires Node 16. Docs using VitePress beta 1. The entry can be found here: https://github.com/vite-pwa/docs/blob/main/frameworks/sveltekit.md You can also use |
I am using this for a SvelteKit app in SPA mode.
These are the configs:
vite.config.js
svelte.config.js
+layout.js
However, despite all attempts for a full day, the output index.html has no meta tags linking to the manifest and has no script tag or even inline script to do the register / inject. Both inline mode or script doesn't work. Both of them are behaving like null.
Dependencies:
The text was updated successfully, but these errors were encountered: