Skip to content

Content hash support #1

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

Closed
insin opened this issue Mar 4, 2018 · 10 comments · Fixed by #59
Closed

Content hash support #1

insin opened this issue Mar 4, 2018 · 10 comments · Fixed by #59

Comments

@insin
Copy link

insin commented Mar 4, 2018

Using [email protected]

Is it possible to support a content hash in the filename, like extract-text-webpack-plugin's [contenthash]?

Using filename: '[name].[chunkhash:8].css' the .css hash is also changing when only the JavaScript in the chunk has changed:

conemu64_2018-03-04_21-35-20

conemu64_2018-03-04_21-42-07

@developer-lindner
Copy link

Needs to be added! There were some issues with Cache Busting not working.
contentHash helps there!

@alexander-akait
Copy link
Member

FYI. From slack:

sokra [3:19 PM]
I'll take care of `[contenthash]` this week. It will be added to webpack core, because it is also needed for JS files in combination with CSS or WASM files.

It is not necessary to implement this here ⭐ Just wait next release webpack@4

@alexander-akait
Copy link
Member

/cc @michael-ciniawsky what do you think, better wait webpack release?

@marcusdarmstrong
Copy link

Shouldn't the chunk hash include the contents of the CSS sources, just as it does for the JS sources?

@Jessidhia
Copy link
Contributor

That's what the chunk hash does, yes. This is the content hash for the individual asset.

@marcusdarmstrong
Copy link

Yes; but the CSSModule defined by this plugin doesn't update the chunk hash—it just relies on the updateHash implementation in Module.

Perhaps that should be treated as a separate issue?

@sokra
Copy link
Member

sokra commented Mar 26, 2018

The impl has finished. CSS module test has also been added. Just waiting for webpack 4.3.0 release with contenthash support to send a PR.

https://github.com/webpack-contrib/mini-css-extract-plugin/tree/feature/contenthash

@philipstanislaus
Copy link

@sokra thanks, this is awesome! Webpack 4.3.0 has just been released.

@bebraw
Copy link

bebraw commented Mar 27, 2018

This should work now.

@bebraw bebraw closed this as completed Mar 27, 2018
@bebraw
Copy link

bebraw commented Mar 27, 2018

Sorry, my mistake. #59 has to land first.

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

Successfully merging a pull request may close this issue.

8 participants