Skip to content

Commit

Permalink
Update documentation/docs/30-advanced/40-service-workers.md
Browse files Browse the repository at this point in the history
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
  • Loading branch information
dummdidumm and benmccann committed Nov 2, 2022
1 parent 5f4dccb commit 28038d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion documentation/docs/30-advanced/40-service-workers.md
Expand Up @@ -73,4 +73,4 @@ self.addEventListener('fetch', (event) => {

> Careful with caching too much for too long! Browsers have a limit on the amount they cache, and not everything should be cached, for example requests that contain dynamic data that change over time
Because the service worker needs to be bundled (since browsers don't yet support `import` in this context), and depends on the client-side app's build manifest, **service workers only work in the production build, not in development**. To test it locally, use `vite preview` after running a build.
Because service workers need to be bundled (since browsers don't yet support `import` in this context), **SvelteKit's service workers only work in the production build, not in development**, since it depends on the client-side app's build manifest. To test it locally, use `vite preview` after running a build.

0 comments on commit 28038d7

Please sign in to comment.