Cache busting
Hi, how about adding an hash on compiled css and js when deploying to production?
Hi @dangelion
If you want provide global hash to files, just simply turn in ON (hash: true) for HTMLWebpackPluginmethod at the beginning of the webpack.config.js
Another way to deal with it is to add manualny generated hash for your output file name, for example:
Without hash app.js:
filename: 'js/[name].js'
With 6-char hash:
filename: 'js/[name].[hash:6].js'
Hope I helped you. Best
@dangelion are you OK with the answer from @mukaspc?
Note - turning on hash only works on images and fonts in the default webpack config. The generated js and css file is untouched.
I was able to change it for js and css by adding (the missing) [hash:6] to the filenames.