webpack contenthash chunkhash chunk #18892
jianxingyao
started this conversation in
General
Replies: 1 comment 2 replies
-
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
对于 contenthash 和 chunkhash 上网查阅的资料显示,一个相对于文件内容,一个相对于 chunk 内容,但是 对于某一个 chunk 中,如果分离出去一些文件(例如 通过 MiniCssExtractPlugin 分离出去的 css) 这些 css 文件的 chunkhash 是相对于被切割的 chunk 的,但是如果分离出去的 文件 是 js ,这个文件则自己成为了 一个 chunk ,chunkhash 则相对于自己 ,对于 图片,chunkhash 将无效,只有 contenthash 生效 这让我非常困惑,希望有人能解答
For contenthash and chunkhash The data consulted on the Internet shows that one is relative to the content of the file and the other is relative to the content of the chunk, but For a chunk, if some files are separated out (e.g. css separated by MiniCssExtractPlugin) The chunkhash of these css files is relative to the chunk being cut, but if the separated file is js, This file becomes a chunk on its own, and chunkhash is relative to itself, for images, chunkhash will be invalid, only contenthash will work, which is very confusing to me, I hope someone can answer
Beta Was this translation helpful? Give feedback.
All reactions