-
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
feat(gatsby): Enable develop SSR for everyone #29251
Conversation
@KyleAMathews Can you check why the e2e tests are failing? It looks like real failures. |
Hmm strange — might be a configuration issue — we've had those tests running with ssr this whole time. Investigating. |
Looks like hydration issues 👀 Hrmmm — maybe we weren't running these |
…or special characters in the path
@@ -49,8 +49,13 @@ export const restartWorker = (htmlComponentRendererPath): void => { | |||
|
|||
const searchFileForString = (substring, filePath): Promise<boolean> => | |||
new Promise(resolve => { | |||
const escapedSubString = substring.replace(/[.*+?^${}()|[\]\\]/g, `\\$&`) |
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 was causing failing tests on the development-runtime for paths like -[client-only]
as they'd crash the server
@@ -10,13 +10,13 @@ export const route = ({ app, program, store }): any => | |||
app.get(`*`, async (req, res, next) => { | |||
trackFeatureIsUsed(`GATSBY_EXPERIMENTAL_DEV_SSR`) | |||
|
|||
const pathObj = findPageByPath(store.getState(), req.path) | |||
const pathObj = findPageByPath(store.getState(), decodeURI(req.path)) |
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.
needed for unicode paths like /안녕
render() { | ||
if (this.state.hasRendered) { | ||
return ( | ||
<ConditionalFastRefreshOverlay> |
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.
The overlays are client-only so we don't render them initially to avoid React saying there's hydration problems
202675e
to
94d7f6f
Compare
@@ -2,7 +2,7 @@ const COUNT_ID = `count` | |||
|
|||
describe(`hooks`, () => { | |||
beforeEach(() => { | |||
cy.visit(`/hooks`).waitForRouteChange() | |||
cy.visit(`/hooks`, { failOnStatusCode: false }).waitForRouteChange() |
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.
the dev server now returns 404s
Close in favor of #29720 |
20% rollout went smoothly & time to rock & roll.
PR includes some misc test fixes to fixes issues exposed by rollout.