1.1.0 • Published 10 months ago
offline-worker v1.1.0
offline-worker
installation
$ npm i offline-worker --save-dev
$ cp node_modules/offline-worker/worker.js public
where public is your public/static directory
then in your front-end code use:
import register from 'offline-worker';
register();
result
your service worker makes your page run offline
first getting fresh requests, and falling back on cache