Skip to content
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

Hashed module ids by default #8268

Closed
smelukov opened this issue Oct 24, 2018 · 8 comments
Closed

Hashed module ids by default #8268

smelukov opened this issue Oct 24, 2018 · 8 comments

Comments

@smelukov
Copy link
Member

smelukov commented Oct 24, 2018

Feature request

What is the expected behavior?

Consistent chunk hash

What is motivation or use case for adding/changing the behavior?

After this PR we have got worst long-term caching "out of the box" because modules id were changed very often (even if don't change these modules) and chunk hash was changed too (because modules id were in bootstrap code).

How should this be implemented in your opinion?

optimization.moduleIds: 'hashed' in prod-mode by default

Are you willing to work on this yourself?
yes

@ooflorent
Copy link
Member

moduleIds: hashed is deprecated in the next branch in favor of deterministic.

@smelukov
Copy link
Member Author

@ooflorent got it
I still think that moduleIds should be hashed deterministic by default

@smelukov
Copy link
Member Author

If there are no objections then I would like to create PR

@ooflorent
Copy link
Member

Sure! Then do it on next branch ;)

@smelukov
Copy link
Member Author

Any ideas what’s wrong with tests? :)

@smelukov
Copy link
Member Author

smelukov commented Oct 29, 2018

Is anyone can look at the test's error?
It fails in places that I didn't touch

@smelukov smelukov closed this as completed Nov 7, 2018
@smelukov
Copy link
Member Author

smelukov commented Nov 7, 2018

PR was merged 🎉

@smelukov
Copy link
Member Author

smelukov commented Nov 13, 2018

moduleIds: hashed is deprecated in the next branch in favor of deterministic.

@ooflorent can you tell me please what's the biggest profit from using DeterministicModuleIdsPlugin instead of HashedModuleIdsPlugin? Why HashedModuleIdsPlugin will be deprecated in webpack 5?
Seems like these two are the same, but DeterministicModuleIdsPlugin generates a pure numeric ids

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

No branches or pull requests

2 participants