Created
March 27, 2018 03:45
-
-
Save davehax/8b0ec3a34b64af57604b0d7c06314cf2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// webpack.config.js example | |
var OfflinePlugin = require('offline-plugin'); | |
module.exports = { | |
// ... | |
plugins: [ | |
// ... other plugins | |
// it's always better if OfflinePlugin is the last plugin added | |
new OfflinePlugin({ | |
ServiceWorker: { | |
// output to root level of project | |
output: "../service-worker.js", | |
// prevent conflicts with minifiers | |
minify: false | |
} | |
}), | |
] | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment