-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Added documentation for [contenthash] #6839 #2085
New issue
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
src/content/configuration/output.md
Outdated
@@ -213,6 +214,12 @@ Using hashes based on each chunks' content: | |||
filename: "[chunkhash].bundle.js" | |||
``` | |||
|
|||
Using hashes generated for extracted content : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No space before colon
@dhruvdutt @montogeek I applied the requested changes but there is an unrelated error in the scripts that is breaking the build and I believe it will do the same for all new PRs |
src/content/configuration/output.md
Outdated
@@ -213,6 +214,12 @@ Using hashes based on each chunks' content: | |||
filename: "[chunkhash].bundle.js" | |||
``` | |||
|
|||
Using hashes generated for extracted content: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is extracted content just content generated by eg mini-css-extract-plugin
or does it include all other content (eg JS bundles) too? How does it differ from chunkhash
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chunkhash is calculated for a chunk (an entry file) while content hash is a special hash generated by eg mini-css-extract-plugin and is calculated for extracted content only not the whole chunk content. This is very useful in the case of mini-css-extract-plugin as when the extracted css is changed the css hash only is invalidated not the entire chunk.
did not want to add all these extra info here but will create a PR and add it with an example in https://webpack.js.org/guides/caching/#output-filenames as per your issue
@FadySamirSadek Can you add a note regarding #2096 ? |
Thanks! |
Added output file name example for the new introduced [contenthash]