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

Update hashed-chunk-ids-plugin.js #1753

Merged
merged 1 commit into from Aug 10, 2017
Merged

Conversation

bskimball
Copy link
Contributor

This skips the hash function if the chunk.id is null and chunk.name is undefined. Assume that if the id is null and the name is undefined, then there is something wrong with that module and do not hold up the entire build process.

This is in reference to #1659

This skips the hash function if the chunk.id is null and chunk.name is undefined. Assume that if the id is null and the name is undefined, then there is something wrong with that module and do not hold up the entire build process.
@gatsbybot
Copy link
Collaborator

Deploy preview ready!

Built with commit c376f9d

https://deploy-preview-1753--using-drupal.netlify.com

@gatsbybot
Copy link
Collaborator

Deploy preview ready!

Built with commit c376f9d

https://deploy-preview-1753--gatsbygram.netlify.com

@KyleAMathews
Copy link
Contributor

Ok... I guess this is better than what we had before? What I don't know is how webpack will respond to us returning the same key for multiple chunks. Does it combine them internally or something or not know how to reference them? Perhaps creating a random value would make more sense?

@KyleAMathews
Copy link
Contributor

Though I dunno, if the chunk.id and chunk.name are already null then clearly webpack handles it somehow or another…

@bskimball
Copy link
Contributor Author

bskimball commented Aug 10, 2017

I think there was a check that webpack added in v2 that circumvented this error. (webpack/webpack#4072). Obviously upgrading to webpack 2 is a big ticket item and is already a different PR.

Essentially we are performing our own check. If there is an issue with the module then we should see a different error somewhere else. Right now the hash function fails, and doesn't show which module is failing it just brings the build process to a halt.

I know this may not 'fix' the issue but I think it is a little better. It certainly fits my needs and use case.

@KyleAMathews
Copy link
Contributor

Cool, let's give this a go then. Probably won't make anything worse 😈

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

Successfully merging this pull request may close these issues.

None yet

3 participants