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

feat: pathname in SSR APIs when in develop #12995

Merged
merged 2 commits into from
Apr 13, 2019
Merged

feat: pathname in SSR APIs when in develop #12995

merged 2 commits into from
Apr 13, 2019

Conversation

neo
Copy link
Contributor

@neo neo commented Apr 1, 2019

Update the docs for this change: #9792.
It's not a breaking change.
It also adds the pathname to onRenderBody and onPreRenderHTML in developer.

@neo neo requested a review from a team as a code owner April 1, 2019 16:40
@neo
Copy link
Contributor Author

neo commented Apr 2, 2019

Actually I also found that it only works in build but not develop?

@neo neo changed the title chore(docs): Update docs for #9792 feat: pathname in SSR APIs when in develop Apr 2, 2019
@pieh
Copy link
Contributor

pieh commented Apr 2, 2019

In develop it will always be / (because we don't create actual html pages there other than main one), but it probably makes sense to use it anyway for parity

@neo
Copy link
Contributor Author

neo commented Apr 2, 2019

good point, I added that because it broke npm start when I tried to use pathname in the SSR APIs.

actually I was also confused that why SSR was called during gatsby develop...

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.

Thanks @neo!

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.

2 participants