-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Having an issue with ssr = false #52
Comments
@hamishjohnson if you're using precaching you need 1 route as fallback, by default is the entry point: you need to prerender 1 route |
it seems kit 1.5.0 has some problems with SSR builds, if you check the sw it includes server assets... can you try updating to latest version? Tried with adapter node and same result... |
Yeah I tried it with prerendering the root page in +page.ts. And I just tried in both 1.16.3 and 1.14 but I'm experiencing the same problem. In each version when running build the server files get included which also confused me but that seems to have always been the case as seen here sveltejs/kit#9161 |
@hamishjohnson you can solve server assets including workbox: {
globPatterns: ["client/**/*.{js,css,html,ico,png,svg}"],
globIgnores: ["server/*.*"] // <== to remove server entries from sw precache manifest
}, Since you're using Using |
Ah :) The glob ignore worked for me, so I didn't try the Node Adapter, though I did try that before. Thanks for your help! I guess it should be documented. |
@hamishjohnson should be fixed in |
I'm trying to get this package working with a SPA with
export const ssr = false;
but it doesn't seem to be working when deployed. It works fine in dev mode.I get this error
And so I tried prerendering the homepage but kept getting further precache issues
Here's an example repo https://github.com/hamishjohnson/test-sveltkit-pwa
And here it is deployed: https://test-sveltkit-gfjc7ulcj-hamishjohnson.vercel.app/ with errors in console
The text was updated successfully, but these errors were encountered: