100lvlmaster / svelte-pwa

An example of svelte pwa
21 stars 2 forks source link

service worker #1

Open ralyodio opened 2 years ago

ralyodio commented 2 years ago

how is the service worker loaded? i don't see it reference anywhere in your code.

neckaros commented 2 years ago

how is the service worker loaded? i don't see it reference anywhere in your code.

On build time from svelte. From his article:

Svelte will automatically detect the service-worker in the src folder's root and then register our service worker during build.
Isn't that neat?

https://dev.to/100lvlmaster/create-a-pwa-with-sveltekit-svelte-a36