Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

What is the difference between hash, chunkhash and contenthash? #153

Closed
ahmed1490 opened this issue Feb 17, 2016 · 4 comments
Closed

What is the difference between hash, chunkhash and contenthash? #153

ahmed1490 opened this issue Feb 17, 2016 · 4 comments

Comments

@ahmed1490
Copy link

Also I dont understand what is a chunk. Can this be made clearer in readme as well?

@ahmed1490 ahmed1490 changed the title What is the difference between hash, chunkhash and content hash What is the difference between hash, chunkhash and contenthash Feb 17, 2016
@ahmed1490 ahmed1490 changed the title What is the difference between hash, chunkhash and contenthash What is the difference between hash, chunkhash and contenthash? Feb 17, 2016
@sbussard
Copy link

Is no one able to answer this question?

@Poky85
Copy link

Poky85 commented Jun 9, 2016

hash is calculated for a build, chunkhash is calculated for chunk (entry file), contenthash is special hash generated in ExtractTextPlugin and is calculated by extracted content, not by whole chunk content

See this article https://medium.com/@okonetchnikov/long-term-caching-of-static-assets-with-webpack-1ecb139adb95#.f9aon6s3b

@PhiLhoSoft
Copy link

PhiLhoSoft commented Jul 1, 2016

The question is good (I had the same)... It is mostly about Webpack, but indeed contenthash is specific to this plugin.
Additional references: https://webpack.github.io/docs/code-splitting.html explains chunks (not very clear...), and http://survivejs.com/webpack/building-with-webpack/splitting-bundles/ (and other chapters) can bring more information.
@ahmed1490 if your question is answered, you should close this issue...

@szegheo
Copy link

szegheo commented Oct 12, 2018

It's old, but If anyone came here and still confused, see my answer on Stackoverflow with examples:
https://stackoverflow.com/a/52786672/5263363

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

No branches or pull requests

6 participants