-
Notifications
You must be signed in to change notification settings - Fork 47
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
5.0.0-alpha.4 generates wrong integrity hash with mini-css-extract-plugin #154
Comments
@sokra any thoughts here? The only change in alpha.4 is the one you suggested (return undefined instead of old hash.) |
Could you try if this still happens without source map |
Hi @sokra as described in the issue, one required condition to trigger this bug is to enable sourcemap. So if sourcemap isn't enabled, then it works fine. |
The circular hashes between source map and source file are the problem. Impossible to calculate a real hash for both. We need to add something to enforce the real hash for the source file. Or flag real hash as lower prio for the source map. |
@sokra it sounds like you're going to address this in Webpack core, or does this need any changes in this plugin? |
Hmm the interesting thing is that this bug doesn't happen to style-loader, not sure if it is an issue on mini-css-extract-plugin |
Ok I looked into it and actually there are not circular hashed between source map and source file. It seems like the CSS files doesn't have the integrity hash as
|
Also, fix stats factory when using real content hash. Closes #154
@jscheid verified that it works! |
Thanks for checking. Fix released in v5.0.0-alpha.5. |
Repro
sri-breaks-css
: https://github.com/zlk89/webpack-reprods/tree/sri-breaks-cssyarn
yarn start
and go to http://localhost:8080/, you can see an error on console:5.0.0-alpha.3
andyarn
to reinstall dependencyyarn start
again, and it works nowThis appears to be related with the contenthash fix in 5.0.0-alpha.4, because this only happens when:
The text was updated successfully, but these errors were encountered: