Every time the package chunkhash will change, the source code will also change, how to avoid

the chunkhash will change every time it is packaged, and the source code will change as well. How to avoid

clipboard.png

Jun.02,2022

if the location of the source file changes, or the way it is introduced, chunkhash will change.

chunkhash has an advantage over hash: it parses dependent files according to different entry files (Entry), builds the corresponding chunk, and generates the corresponding hash.

therefore, as long as the source code remains the same, the location of the source file remains the same, and the way the source code is introduced (whether it is loaded on demand or not), the chunkhash will not change.


you can remove chunkhash. If you still need hsah function, you can install a HtmlWebpackPlugin module

.
Menu