html-hash-webpack-plugin
A webpack plugin that parse HTML in search of hashable js chunks. The plugin takes the hashed chunks generated by webpack.optimize.CommonsChunkPlugin and parses the HTML to find those chunks and add the hash to the filename.
Installation
npm install html-hash-webpack-plugin --save-dev
Usage
In webpack.config.js:
var webpack = ;var HtmlHashPlugin = ; moduleexports = /// ... rest of config plugins: 'vendors' 'vendors.[chunkhash].js' origin: 'src/' output: 'public/' html_file: 'index.html' // default_
So, in the origin file, we'll have:
After running the plugin, we'll get:
hash numbers are just an example ;-)
MIT License