Skip to content

Conversation

@KyleAMathews
Copy link
Contributor

The listeners were gettiing reattached on every SSR.

Also... ssr changes weren't getting compiled w/o a save. So this fixes two bugs.

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Dec 1, 2020
@KyleAMathews KyleAMathews added type: feature or enhancement Issue that is not a bug and requests the addition of a new feature or enhancement. and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Dec 1, 2020
Comment on lines +16 to +22
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
Copy link
Contributor

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?

Copy link
Contributor

@pieh pieh left a 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

@pieh pieh merged commit 3ce476b into master Dec 1, 2020
@delete-merged-branch delete-merged-branch bot deleted the start-listener branch December 1, 2020 08:46
pieh pushed a commit that referenced this pull request Dec 1, 2020
…it listeners once (#28395)

* fix(gatsby): move starting dev-ssr listener inside function & only init listeners once

* fix snapshot

(cherry picked from commit 3ce476b)
pieh pushed a commit that referenced this pull request Dec 1, 2020
…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 <mathews.kyle@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature or enhancement Issue that is not a bug and requests the addition of a new feature or enhancement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants