You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new DEV_SSR: true flag does not seem to work properly when testing without trailing slashes.
Using DEV_SSR it seems that gatsby links cannot properly determine isCurrent the same way between the client and server if you do not have a trailing slash. This is causing the mismatch only in the DEV_SSR environment.
During a production build SSR IS able to report on isCurrent and the client and server code indeed match.
Browse to http://localhost:9000/test (no trailing slash)
Compare Server vs Client for that Gatsby Link and notice that they both match.
Expected result
That with DEV_SSR: true it should NOT error/warning about this as it will not be an issue in build.
It seems that DEV_SSR will need to properly be able to detect location in order for this to work.
Actual result
With DEV_SSR: true it is not properly reporting location during SSR only.
Hi! Please report your issue in the umbrella discussion as this is the single place for bug reports/feature requests/discussion about that flag/experiment: #28138
Thanks!
Description
The new
DEV_SSR: true
flag does not seem to work properly when testing without trailing slashes.Using DEV_SSR it seems that gatsby links cannot properly determine isCurrent the same way between the client and server if you do not have a trailing slash. This is causing the mismatch only in the DEV_SSR environment.
During a production
build
SSR IS able to report onisCurrent
and the client and server code indeed match.We are (have been for a few years) using the gatsby-plugin-remove-trailing-slashes plugin.
Steps to reproduce
yarn install
yarn start
http://localhost:8000/test
(no trailing slash)If you wish to further test...
yarn build && yarn serve
http://localhost:9000/test
(no trailing slash)Expected result
That with
DEV_SSR: true
it should NOT error/warning about this as it will not be an issue inbuild
.It seems that DEV_SSR will need to properly be able to detect location in order for this to work.
Actual result
With
DEV_SSR: true
it is not properly reporting location during SSR only.Environment
The text was updated successfully, but these errors were encountered: