Skip to content

Instantly share code, notes, and snippets.

@charlesBochet
Created June 26, 2017 21:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charlesBochet/7b4f6f34efb9d9ee231c14e8965819be to your computer and use it in GitHub Desktop.
Save charlesBochet/7b4f6f34efb9d9ee231c14e8965819be to your computer and use it in GitHub Desktop.
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