svelte-pwa-boilerplate

Svelte Pwa Boilerplate

boilerplate that enables pwa functionality in basic svelte template

this boilerplate is designed for enabling PWA (with offline functionality) in basic Svelte template

how to use it:

install rollup-plugin-workbox

npm install --save rollup-plugin-workbox

add this lines to the top of rollup.config.js:

import { injectManifest } from 'rollup-plugin-workbox';

const workboxConfig = require('./public/workbox-config.js')

add this to plugins section in rollup.config.js:

injectManifest(workboxConfig)

add files from 'public' directory to your project`s 'public' directory (replace 'index.html')

main rules for caching are written in workbox-config.js file

Top categories

Loading Svelte Themes