-
-
Notifications
You must be signed in to change notification settings - Fork 384
fix: improve contenthash generation #482
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
Codecov Report
@@ Coverage Diff @@
## master #482 +/- ##
==========================================
- Coverage 88.49% 88.37% -0.13%
==========================================
Files 5 5
Lines 426 430 +4
Branches 94 96 +2
==========================================
+ Hits 377 380 +3
- Misses 47 48 +1
Partials 2 2
Continue to review full report at Codecov.
|
hash.update(hashSalt); | ||
} | ||
|
||
hash.update(`${chunk.id} `); |
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.
These two are not part of the content of the css file
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.
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.
@sokra @evilebottnawi any update on this?
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.
As far as I can tell, CSS modules don't have id
property set so the hash is going to be the same. Would it be better to add hash.update(m.index2)
(since index2 is used to sort the modules before rendering content asset) below after m.updateHash(hash)
?
This PR contains a:
Motivation / Use-Case
fixes #454
Breaking Changes
No
Additional Info
/cc @sokra
Do we need more logic for contenthash generation as in https://github.com/webpack/webpack/blob/master/lib/javascript/JavascriptModulesPlugin.js