ServiceWorker loader for Webpack $ npm install --save-dev serviceworker-loader Usage Documentation: Using loaders var registerServiceWorker = require("serviceworker!./sw.js"); registerServiceWorker({ scope: '/' }).then(success, error); Credit This loader is based almost entirely on worker-loader by @sokra. License MIT (http://markdalgleish.mit-license.org)