-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
fix(gatsby): move starting dev-ssr listener inside function & only init listeners once #28395
Conversation
…it listeners once
|
||
There are 5 other flags available that you might be interested in: | ||
- FAST_DEV · Enable all experiments aimed at improving develop server start time | ||
- DEV_SSR · (Umbrella Issue (https://github.com/gatsbyjs/gatsby/discussions/28138)) · SSR pages on full reloads during develop. Helps you detect SSR bugs and fix them without needing to do full builds. | ||
- QUERY_ON_DEMAND · (Umbrella Issue (https://github.com/gatsbyjs/gatsby/discussions/27620)) · Only run queries when needed instead of running all queries upfront. Speeds starting the develop server. | ||
- ONLY_BUILDS · (Umbrella Issue (test)) · test | ||
- YET_ANOTHER · (Umbrella Issue (test)) · test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this here? And why unit tests passes here without any changes to tests? did we merge something that didn't update snapshot?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is ok (good to check if we attached listeners already or not), but the root problem to me is that we call startListener()
multiple times - we should not do that in first place
…it listeners once (#28395) (#28418) * fix(gatsby): move starting dev-ssr listener inside function & only init listeners once * fix snapshot (cherry picked from commit 3ce476b) Co-authored-by: Kyle Mathews <[email protected]>
The listeners were gettiing reattached on every SSR.
Also... ssr changes weren't getting compiled w/o a save. So this fixes two bugs.