Skip to content

Instantly share code, notes, and snippets.

@computercam
Created August 13, 2018 19:31
Show Gist options
  • Save computercam/436cf69566479369df685f59954649b8 to your computer and use it in GitHub Desktop.
Save computercam/436cf69566479369df685f59954649b8 to your computer and use it in GitHub Desktop.
Vue CLI 3 Webpack cache busting
module.exports = {
chainWebpack: config => {
config.plugin('html').tap(args => {
args[0].hash = true
return args
})
}
}
@segovia-no
Copy link

this effectively doubles the requested bundle in chrome for certain bundles by requesting the original .js file plus the .js? file. I don't really know why but for at least two of my projects this effect is present using this code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment