-
-
Notifications
You must be signed in to change notification settings - Fork 388
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
fix(index): assign empty module.id
to prevent contenthash
from changing unnecessarily
#284
Conversation
module.id
to prevent contenthash
from changing unnecessarily
@lfre Are those test also failing locally if you run them? |
@michael-ciniawsky Yes, they are. It makes sense because this would change the hashes of the expected. I imagine I have to replace those. Do I go into each test and run their webpack configs, or is there another way? |
Yeah, seems to be the case please double check if the file contents still match :) super annoying... 🙄 |
The async and MemoryFS test seem to be unrelated (not 💯 sure for the async one) |
@michael-ciniawsky Updated the tests. A couple things to notice:
Everything else maintains the same contents. Let me know if these are bugs or unexpected pluses. For the duped file in |
|
@michael-ciniawsky @evilebottnawi @sokra I'd appreciate some feedback here. 🙏 |
@@ -1,4 +0,0 @@ | |||
.styleA { background: red; } |
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.
I wonder why this file was removed..
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.
👍
Looks tests also broken 😕 |
@evilebottnawi Tests are passing locally using latest node 8. Only one test is failing if you see the log and my comment #284 (comment). I'm going to try downgrading to node 6 to test but I'd appreciate any other ideas on how to approach this. |
/cc @sokra can we merge and release patch? |
👍 |
Released in |
@lfre @michael-ciniawsky I have a question about this change or module So, my question is: would it be an issue to initialize |
@erykpiast Yes, initially I suggested using |
Hey @lfre, thank you for the response! I cannot get why your solution wasn’t accepted, what was the issue with it? In my case CI is an issue as well, repository is cloned to directory prefixed with build ID, so absolute path differs from build to build. In the worst case, file hash changes when its contents did not change, so the whole idea of hashing looses its sense. |
@lfre Maybe I'll open separate issue for this? |
Go for it @erykpiast |
👍#308 |
Content hashes change when the entries order or length changes
JSON.stringify
, because it outputs""
on an empty string, modifying the hash unnecessarily.Reproduction: https://github.com/lfre/mini-css-extract-plugin-contenthash
Type
Issues
SemVer