Skip to content
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

Replace [chunkhash] with [contenthash] #2098

Merged
merged 2 commits into from
Aug 4, 2018

Conversation

FadySamirSadek
Copy link
Member

Replaced [chunkhash] with [contenthash] in code examples and defined [contenthash]

Replaced [chunkhash] with [contenthash] in code examples and defined [contenthash]
@FadySamirSadek
Copy link
Member Author

FadySamirSadek commented May 4, 2018

#2085 #2096

@alexander-akait
Copy link
Member

@FadySamirSadek looks good, need check other places on [chunkhash] to avoid misleading

@FadySamirSadek
Copy link
Member Author

@evilebottnawi Will compile a list of all places that mention [chunkhash] and work on them. Thank you 👍

@montogeek montogeek merged commit 17e927c into webpack:master Aug 4, 2018
@montogeek
Copy link
Member

Thanks!

@naruaway
Copy link

Hi, it seems like still https://webpack.js.org/configuration/output/ recommends the use of chunkhash rather than contenthash.
If we should always use contenthash rather than chunkhash, should we also update this page?

@EugeneHlushko
Copy link
Member

@naruaway i have looked at the page and all references there look valid, which one exactly did you mean?

@naruaway
Copy link

@EugeneHlushko In that page, contenthash is almost only mentioned in the sentence below.
But now contenthash is not only meant for ExtractTextWebpackPlugin use case, right?

When using the ExtractTextWebpackPlugin, use [contenthash] to obtain a hash of the extracted file (neither [hash] nor [chunkhash] work).

@EugeneHlushko
Copy link
Member

The "note" says that when using ExtractTextWebpackPlugin, you shouldn't use other hash placeholders other than contenthash. So that is still the case. I suggest you add contenthash to the table here and that would be it:
Screenshot_2019-07-30 Output webpack

What do you think @naruaway

@naruaway
Copy link

Yes, should we even replace [chunkhash] with [contenthash] in that table?
The title of this PR is "Replace [chunkhash] with [contenthash]".
Does [chunkhash] still have its valid usage?

I was confused when I read the doc.

@alexander-akait
Copy link
Member

alexander-akait commented Jul 31, 2019

@naruaway yes, chunkhash still valid, but is not good for long cache, but can be useful for other purpose

@EugeneHlushko
Copy link
Member

yup so just add [contenthash] to the table should be it

@EugeneHlushko
Copy link
Member

@naruaway are you at it?

@EugeneHlushko
Copy link
Member

this was stalled, so i fixed it in #3233 to close #3209

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants