About the webpack Pure Packaging Project

encounter a demand, the front end uses webpack to package the pages you want, and the pages you don"t need are not packaged. After packaging, only the page code you want is pure. Gulp can be implemented at present. Does webpack have a solution?

May.15,2022

of course there is. CommonsChunkplugin before
webpack4.x extracts the common code, and SplitChunks after webapck4.x implements the same function.
use tree shaking to implement the code that gets the specified functional block of the specified file.
use code splitting to convert large files of build output into several small files.
use entry to control webpack for chunk , use chunk to control input and output, and
use html-webpack-plugin options.chunk to specify chunk for the generated * .html file.

all in all, at least 90% of the functions in your daily development can be implemented by webpack.

if you want to learn more about webpack , you can refer to the classmate's webpack-play , which has a lot of summary and sample code.

Menu