-
Notifications
You must be signed in to change notification settings - Fork 14
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
chore: Upgrade Gatsby #138
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Preview is readyThis pull request generated a Preview👀 Preview: https://sfj-ac93b59--gatsby.preview.vtex.app |
Lighthouse ReportsHere are the Lighthouse reports of this Pull Request📝 Based on commit ac93b59
|
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.
LGTM!
@@ -18,6 +18,7 @@ const gatsbyConfig: GatsbyConfig = { | |||
}, | |||
flags: { | |||
FAST_DEV: true, | |||
DEV_SSR: false, |
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.
out of curiosity: why is it false?
Now you can add the DEV_SSR flag to your gatsby-config file so you can spot and fix SSR errors (like trying to access the window object) during development.
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.
when I enable devSSR everything breaks with a hydration mismatch error. Somehow Gatsby does not render the page.tx, only the layout.tsx, creating this mismatch
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.
That's too bad because this seems like a useful feature. :(
Just the other day, a store was using an unprotected window
call inside the PDP that was causing an SSR error, but it did not error during development. It errored (window
is not defined) only if they built & served. It feels like with this flag, it would have errored earlier during development.
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.
Looks good to me as well! Left a quick note.
What's the purpose of this pull request?
This PR upgrades gatsby to the latest version