evo-company / webpack-long-term-caching

This repository includes example config for the webpack to enable long term hashing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Steps to achieve reliable long term caching

  1. Create vendor chunk with deps that change rarely (node_modules).
  2. Add [chunkhash] to the resulting output.filename and output.chunkFilename.
  3. Create runtime chunk to store all chunknames.
  4. Use HashedModuleIdsPlugin.
  5. Use NamedChunksPlugin.
  6. Use NameAllModulesPlugin - npm i -D name-all-modules-plugin.

To read:

About

This repository includes example config for the webpack to enable long term hashing


Languages

Language:JavaScript 100.0%