Caching Assets Long Term with Webpack
Brandon Doran

Hi, I used ‘webpack-md5-hash’ plugin in my config (other common plugins such as HtmlWebpackPlugin, CommonsChink plugin, etc. were used as well) and played with changes in application files. As md5-hash plugin generate hash depending on entry file contents only hash for ‘app’ asset was chaning and hash for ‘vendor’ asset wasn’t (as I didn’t directly make changes in vendor.js entry), despite of manifest in this ‘vendor’ asset was changing. Based on this investigations, seems plugin for long term-chaching such as inline-manifest-plugin, chunk-manifest-plugin, manifest-plugin are not need when using md5-hash-plugin and html-webpack-plugin for injecting scripts and styles!

Like what you read? Give Dmitrii M a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.