Comments (8)
@hamishjohnson should be fixed in v0.2.2
: server/*.*
included in globIgnores
if not configured.
from sveltekit.
@hamishjohnson if you're using precaching you need 1 route as fallback, by default is the entry point: you need to prerender 1 route
from sveltekit.
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...
from sveltekit.
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
from sveltekit.
@hamishjohnson you can solve server assets including globIgnores
:
workbox: {
globPatterns: ["client/**/*.{js,css,html,ico,png,svg}"],
globIgnores: ["server/*.*"] // <== to remove server entries from sw precache manifest
},
Since you're using auto
adapter, there is no way to copy prerendered/pages/index.html
to the output folder: you must copy it manually, the navigateFallback
is properly added to sw precache manifest (just check .sveltekit/output/client/
folder).
Using node
adapter also works, the output folder will be build
, but same problem with prerendered page.
from sveltekit.
uhmm, node adapter should work, I'll test it later:
from sveltekit.
it works, running yarn preview
after changing to node adapter and building the app:
from sveltekit.
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.
from sveltekit.
Related Issues (20)
- Example project renders home page on missing routes HOT 5
- Failed to load config v0.2.1 HOT 3
- Add a test
- Can't get @vite-pwa/sveltekit to work out-of-the-box HOT 14
- Issues with SPA HOT 1
- Inject Register script or inline has no effect on output HTML. HOT 6
- [Info] Cloudflare Adapter Routes misses vite-pwa HOT 1
- Cannot find module 'virtual:pwa-info' or its corresponding type declarations HOT 26
- Importing 'virtual:pwa-register' causes bug on build HOT 3
- Make client Javascript work offline HOT 2
- Deprecated packages HOT 2
- Uncaught (in promise) non-precached-url: non-precached-url :: [{"url":"/"}] HOT 13
- Navigating to SvelteKit error page after a new build causes infinite page reload loop HOT 5
- InjectManifest `The 'swSrc' file can't be read. ENOENT: no such file or directory` error on Gitlab CI HOT 5
- Uncaught ReferenceError: process is not defined for injectManifest HOT 1
- Error: [InjectManifest] 'plugins' property is not expected to be here. HOT 1
- Support Node v20 HOT 1
- Uncaught SyntaxError: Unexpected token 'export' HOT 3
- `_app/version.json` should be included in sw precache manifest
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sveltekit.