-
-
Notifications
You must be signed in to change notification settings - Fork 293
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
SWs & Webpack #128
Comments
(text may have a lot of type because I wasn't re-reading/reviewing it) I actually been thinking about this issue for a while. I'm not sure with which case exactly you have this problem (because there are few ways to get into it), but let me try to cover and answer all them. So.. There are couple of ways with Things in
@KyleAMathews I hope it helps. Please let me know if does or not and which exact case is yours here. Thanks! 👌 |
@NekR this is really really helpful!! Will be digging through this tomorrow and will get back to you. And |
Awesome answer! Thanks for info. |
@nodkz Would be good to transfer it somehow to the docs :-) |
So to close this out — the problem seems 100% caused by not having |
I noticed the same problem as @KyleAMathews mentioned. I use CommonsChunk plugin with OccurrenceOrder plugin. When new version of app is built and pushed to server, at the first load there is a blank page, which means that there was some problem with chunk loading. I tried to use |
@mciastek it's really hard to help in this situation without seeing project's code. But it's for sure that
No, it's unrelated and won't help. Basically, right now |
Thanks a lot for the summary - very helpful! What if I can't use |
@jampy will be trying https://github.com/zhenyong/webpack-stable-module-id-and-hash with GatsbyJS soon! Not very happy with |
TBH, I think webpack doing bad job here with module ids and hashes. It should be fixed on core level and everything here are just hacks :-( |
FYI, I checked the code of webpack-stable-module-id-and-hash and found some issues. See my pull request: zhenyong/webpack-stable-module-id-and-hash#1 |
@jampy yeah, great PR 👍 |
@NekR is this issue still relevant, since offline-plugin now generates its own hashes?
|
@GGAlanSmithee I think it makes sense to keep this open to pull the information from to the docs someday, but thanks for reminding me about this issue :-)
|
Closing. If any one is wishing to transfer some bits of this discussion to docs -- feel free to do so. |
Hey, question for the community here — this isn't an issue for offline-plugin but I'm asking here as y'all are the ones most likely it seems to have faced the same problem (and hopefully found some good solutions).
I've integrated offline-plugin into the next version of Gatsby and it works great. A problem I'm seeing though is that when I deploy a new version of a site, Webpack doesn't seem to maintain the same module ids for all modules. So after deploying, I load the site and the chunks that weren't changed are loaded from the service worker and the new chunks are loaded from the server but almost always there'll be a JS error when Webpack can't find a module id to call.
So perhaps I'm just doing this wrong — is the solution just to ensure that you load all chunks from the old SW until a new one is loaded and then switch over en masse?
The text was updated successfully, but these errors were encountered: