The Hardsourcewebpackplugin plugin does not increase the speed of the first build, but it can increase the build speed by 99% for the second build
Build for the first time:
Second time:
Improved the. , not to come out, anyway is a lot of ~ ~ ~
NPM Install--save Hard-source-webpack-plugin
//Webpack.config.jsvarHardsourcewebpackplugin = require ('Hard-source-webpack-plugin');NewHardsourcewebpackplugin ({//either an absolute path or relative to Webpack ' s options.context.Cachedirectory:'Node_modules/.cache/hard-source/[confighash]', //either an absolute path or relative to Webpack ' s options.context. //sets Webpack ' s recordspath if not already set.Recordspath:'Node_modules/.cache/hard-source/[confighash]/records.json', //either a string of object hash function given a webpack config.confighash:function (webpackconfig) {//Node-object-hash on NPM can is used to build this. returnRequire'Node-object-hash') ({sort:false}). hash (webpackconfig); }, //either false, a string, an object, or a project hashing function.Environmenthash: {ROOT:PROCESS.CWD (), directories: [], Files: ['Package-lock.json','Yarn.lock'], },}),
Https://github.com/mzgoddard/hard-source-webpack-plugin
Webpack boost build speed of 90% Hardsourcewebpackplugin