$ npm install --save-dev serviceworker-loader
var registerServiceWorker = require("serviceworker!./sw.js");
registerServiceWorker({ scope: '/' }).then(success, error);
This loader is based almost entirely on worker-loader by @sokra.
$ npm install --save-dev serviceworker-loader
var registerServiceWorker = require("serviceworker!./sw.js");
registerServiceWorker({ scope: '/' }).then(success, error);
This loader is based almost entirely on worker-loader by @sokra.