-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
No manifest file #293
Comments
@zpovsic are you using the same code with the |
@userquin - correct (including adapter static)
should become
in pwa.js The copy now does not fail anymore |
I have been working with Ben to align kit and vite, but we have a problem with a race condition in kit and pwa plugin in the write and close bundle hooks. You can check this PR #327 The folks at Vite and Rollup have gotten involved and an RFC is open to fix the existing problem, you can see it here: I have been trying to correct the problem by brute force, but for the solution we have to wait for the RFC: |
Thx for this - I am not sure I fully understand all the details. But for now - until I see otherwise in the documentation or I get errors - I changed pwa.js to reflect the new path. And manually added in index.html And in pwa.js search for a workbox*.js file and copy this into build Then the build process runs nicely and I get an installable PWA. |
@Tommertom if you're using SvelteKit 358+ you need to copy sw stuff manually. The problem is the following:
You need to copy manually, ofc if you configure the output folder on the pwa plugin to be the adapter output folder the problem disappear. Since we'll remove both scripts from the SvelteKit example (pwa.js and pwa-configuration.js), I think we don't need to change the docs... With new SvelteKit version, Vite will be configured properly, and so we don't need any of the scripts: Vite's |
Got it! Thx |
Released initial version of custom kit plugin: https://vite-pwa-org.netlify.app/frameworks/sveltekit.html The example in this repo Will be removed, check the New repo for new custom kit plugin here https://github.com/vite-pwa/sveltekit |
In svektekit example there is not generated manifest.webmanifest
error:
Generating PWA...
PWA v0.12.0
mode generateSW
precache 1 entries (0.00 KiB)
files generated
.svelte-kit\output\client\sw.js
.svelte-kit\output\client\workbox-0b852b48.js
warnings
One of the glob patterns doesn't match any files. Please remove or fix the following: {
"globDirectory": "./build/",
"globPattern": "/*.{js,css,html,ico,png,svg,webmanifest}",
"globIgnores": [
"/sw*",
"**/workbox-",
"../.svelte-kit/output/client/sw.js",
"../.svelte-kit/output/client/workbox-.js"
]
}
node:fs:2817
handleErrorFromBinding(ctx);
^
Error: ENOENT: no such file or directory, copyfile './.svelte-kit/output/client/_app/manifest.webmanifest' -> './.svelte-kit/output/client//manifest.webmanifest'
at copyFileSync (node:fs:2817:3)
at file:///F:/WebProjects/sveltekit-pwa/pwa.js:39:4
at Array.forEach ()
at buildPwa (file:///F:/WebProjects/sveltekit-pwa/pwa.js:38:27)
The text was updated successfully, but these errors were encountered: