@justeat/f-serviceworker

Script for registering the service worker


Keywords
fozzie, ui
License
Apache-2.0
Install
npm install @justeat/f-serviceworker@1.0.1

Documentation

f-serviceworker 🐻

npm version Build Status install size

Contains the registration script for service-worker.js located in the root of your website.

const sw = require('@justeat/f-serviceworker');
sw.register();

on all pages that should be managed by the service worker.

Optional configuration object can be passed containing the service-worker.js path. Defaults to /service-worker.js

Sw.register({ swPath: '/subdir/service-worker.js' });