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

Cannot find similar chunks because of filename with hash #141

Closed
erykpiast opened this issue Sep 12, 2019 · 1 comment · Fixed by #143
Closed

Cannot find similar chunks because of filename with hash #141

erykpiast opened this issue Sep 12, 2019 · 1 comment · Fixed by #143
Labels
bug Something isn't working
Milestone

Comments

@erykpiast
Copy link
Owner

Load these two stat files to see the issue:

Archive.zip

The resulting filename of chunks contains content hash (which is, the pretty common configuration) and because of that, chunks cannot be compared between builds. names collection is empty, so files is used as a fallback which is not the best idea in this case.

@erykpiast erykpiast added the bug Something isn't working label Sep 12, 2019
@erykpiast erykpiast added this to the v1 milestone Sep 12, 2019
@erykpiast
Copy link
Owner Author

The best idea that comes to my mind now is to extend the comparison algorithm, so it's like this:

  • check the names collection
  • when there is no match, check files collection
  • when there is no match, check the identifier of the entry points (the first one? all? any?)
  • when there is no match, rely on the order

There is a risk for a false-positive match, though, especially when chunks are added/removed/reordered. react-dev-utils does it by simply removing anything that looks like hash from the filename. Simple, but works in most cases, maybe that's the way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant