- Create vendor chunk with deps that change rarely (node_modules).
- Add
[chunkhash]
to the resultingoutput.filename
andoutput.chunkFilename
. - Create runtime chunk to store all chunknames.
- Use
HashedModuleIdsPlugin
. - Use
NamedChunksPlugin
. - Use
NameAllModulesPlugin
-npm i -D name-all-modules-plugin
.
evo-company/webpack-long-term-caching
This repository includes example config for the webpack to enable long term hashing
JavaScript