Last active
June 26, 2017 21:12
-
-
Save charlesBochet/c52cad33b63e645944ce351a76198ed6 to your computer and use it in GitHub Desktop.
This file contains 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
var SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin') | |
... | |
var webpackConfig = merge(baseWebpackConfig, { | |
... | |
plugins: [ | |
... | |
// service worker caching | |
new SWPrecacheWebpackPlugin({ | |
cacheId: 'my-vue-app', | |
filename: 'service-worker.js', | |
staticFileGlobs: ['dist/**/*.{js,html,css}'], | |
minify: true, | |
stripPrefix: 'dist/' | |
}) | |
] | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment