We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
简言之:chunkhash 无法实现 Long Term Caching
一个 chunk 可能包含不同类型的资源,最终会产出多个文件,比如 JS / CSS,如果使用 chunkhash,当该 chunk 中的 css 变化时,会导致整体的 chunkhash 发生变化,从而 js 的文件名也会受到影响,缓存失效
而 contenthash 是针对文件级别的,当一个文件本身的内容不发生变化时,hash 值就不会发生变化
题外话:为什么有了 contenthash,还需要 chunkhash 呢?
chunkhash 可能有特殊的应用场景,更多的是出于向下兼容的考虑
参考: webpack/webpack.js.org#2096
The text was updated successfully, but these errors were encountered:
No branches or pull requests
简言之:chunkhash 无法实现 Long Term Caching
一个 chunk 可能包含不同类型的资源,最终会产出多个文件,比如 JS / CSS,如果使用 chunkhash,当该 chunk 中的 css 变化时,会导致整体的 chunkhash 发生变化,从而 js 的文件名也会受到影响,缓存失效
而 contenthash 是针对文件级别的,当一个文件本身的内容不发生变化时,hash 值就不会发生变化
题外话:为什么有了 contenthash,还需要 chunkhash 呢?
chunkhash 可能有特殊的应用场景,更多的是出于向下兼容的考虑
参考:
webpack/webpack.js.org#2096
The text was updated successfully, but these errors were encountered: