Script for registering the service worker


101.0.13 years ago4 years agoMinified + gzip package size for @justeat/f-serviceworker in KB


f-serviceworker :bear:

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');

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' });

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.