Closed ghost closed 2 years ago
@webdev03 Caching issue, you need to add a service worker.
Hmm...
Can't recreate the issue.. and @hello-smile6 I think SvelteKit has a service worker (not sure)
- OS: Chromebook?
- Browser Chrome
- Version 97
It's ChromeOS
@JoshAtticus Thanks
Can't recreate the issue.. and @hello-smile6 I think SvelteKit has a service worker (not sure)
Doesn't have one, use Workbox and add it to your build script so it runs after you build your code. Workbox will let your API endpoints fall through.
I can add my own service worker, just add it in src/service-worker.ts
, I just don't know what to put in there.. @hello-smile6 can you please make PR for it?
I can add my own service worker, just add it in
src/service-worker.ts
, I just don't know what to put in there.. @hello-smile6 can you please make PR for it?
Can't be typescript, has to be .js . Let me see...
Just make it .ts since sveltekit transpiles that to JS. You don't need to know TS.
Or, you could build the service worker once you generate the static site, right before deploying it to Vercel's CDN.
Or, you could build the service worker once you generate the static site, right before deploying it to Vercel's CDN.
How to generate one?
Or, you could build the service worker once you generate the static site, right before deploying it to Vercel's CDN.
How to generate one?
npx workbox-cli
, find the create one. Run your build first and output your service worker in the build output.
Then, after you build it, run npx workbox-cli generateSW workbox-config.js
. Also, check out https://lets-annoy-jaydendev.9pfs.repl.co/ (Thanks for pointing out their analytics)
Describe the bug I was having internet issues and I reloaded the page and the CSS was apparently deactivated.
To Reproduce Steps to reproduce the behavior:
Expected behavior Proper design:
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information): none
Additional context Add any other context about the problem here.