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
remove NamedModulesPlugin from production build #2305
remove NamedModulesPlugin from production build #2305
Conversation
Deploy preview ready! Built with commit 6fa2803 |
I'm catching up with convo in #1450 but my main concern here is that it is going to bust long term caching even more than it is already. I believe with need to replace this with something that provides stable id/names otherwise the overall content hash is gonna constantly change (unless i'm miss understanding the failings of webpack's LTH) |
@jquense your concern is ok, but look at the filenames from my links of the example above. They both end with This is actually the issue, that I am trying to fix. Module name has become different, but filename was not changed. Browser returns cached chunk -> main Currently at least I will get consistent build output, that doesn't depend from project files location in the file system. |
@KyleAMathews the AppVeyor run has failed before the actual build has even started. Do you have a button to restart the build? |
@jquense the fix is we added This is where our new custom "HashedChunkIdsPlugin" was added just-boris@f0fccb0#diff-c4777e791f64fbb6c82255341b381dab but NamedModulesPlugin wasn't removed. I'm a bit fuzzy about what webpack would be doing here but perhaps NamedModulesPlugin isn't even being used? Maybe? I want to get off this onto webpack 3 where it seems the situation is mildly more sane. |
I'm thinking a bit about the v2 branch where the hashed chunk Ids plugin was removed because it didn't work anymore and we do lean on the named module and chunk plugins for saner LTC, a la https://medium.com/webpack/predictable-long-term-caching-with-webpack-d3eee1d3fa31 |
Yeah the hashed chunk ids plugin was just for webpack v1. |
Tested removal of |
@KyleAMathews good to know that somehow soon-ish we will have a newer version with Webpack 3, where this issue will go away. But how about merging this, as it resolves the issue immediately, without additional problems? |
Merging and releasing 🎉 |
Thank you! |
Hiya @just-boris! 👋 This is definitely late, but on behalf of the entire Gatsby community, I wanted to say thank you for being here. Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If you have questions, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! 💪💜 |
Follow-up for the discussion in #1450 (comment)
All examples are still build, plus there is my two simple demo pages: