Skip to content

justeat/f-serviceworker

Repository files navigation

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