Webpack long term cache plugin
Install dependences, run npm run dev
to checkout what happened in /example
@reference: https://webpack.github.io/docs/long-term-caching.html
Install
npm i --save-dev long-term-cache-webpack-plugin
or yarn add long-term-cache-webpack-plugin
How to use
const LongTermCachePlugin = ;moduleexports = plugins: filename: '[name].[chunkhash].css' disable: false allChunks: true // required srcPath: '/src' // distPath is required for watch distPath: '/dist' // appHtmlSrcPath: '/src/index.html', // appHtmlDstPath: '/dist/index.html' replaceRules: reg: /\{ASSET_BASE_PATH\}/gi substitute: ''