svelte-workbox Svelte Themes

Svelte Workbox

test serviceworker with workbox

svelte and workbox

try to make this work like an offline PWA

key takeaways

  • put serviceworker in root / - will save you trouble
  • you are suppose to build sw.js separately with bundler (rollup) - and not as a part of your regular build - you can define an array of input/output setups in rollup.config.js or you can have separate config files
  • you also seem to need webmanifest file for offline to work. And yes, also cache manifest in the sw

Top categories

Loading Svelte Themes