-
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
fix(gatsby): Fix client side routing match paths regression #15010
fix(gatsby): Fix client side routing match paths regression #15010
Conversation
f914b24
to
9f0a039
Compare
9f0a039
to
8a71503
Compare
Tested the PR with examples given on the issues and using examples/client-only-paths. It seems to work. Also tested it with prefix-paths 👌 . Some tests would be great. |
Added some end to end tests to this! |
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.
I added some comments about making the e2e-test assets a bit smaller. Might speedup build time. I also wonder if this needs to be a different e2e test rather than just adding these tests to production-runtime. As of now I'm okay with just creating a new one.
@sidharthachatterjee should we add this to circleci? 👀 I'm not sure they are run.
ETA until this fix is merged? Looks like it only needs one more test to pass... ...currently dead in the water on a site until this is fixed, sooooo... ...what's the web dev equivalent of having to pee really badly but stuck in a long line for the bathroom? 🥺 |
@rchrdnsh you can always lock gatsby on version < 2.9.0 |
no version seems to work for me now...I've locked to 2.8.3, 2.8.6, 2.8.8, and I think a couple others, but none work for me, for some reason...🤷♂️ I might be doing it wrong, however. I go into package.json and change the gatsby version number, then delete and re-install my npm modules, and as well as delete the cache. Is this ok? Is there a better way to do it? |
@rchrdnsh better do it using command because your gatsby version is already locked by The other workaround is just removing existing lock file and then installing again. |
hmmmm...never messed with the lock file before...can I just delete that file then |
@rchrdnsh yes you can.
|
This is good to go now. I've removed the new e2e test suite and instead have added tests for these in the existing suites, namely |
Published in |
…#15010) * export loader.findMatchPath * reorganize production-app explicit navigate if statement * strip BASE_PATH prefix before finding matchPath * Add end to end tests * Remove screenshots * Update tests * Add .gitignore * Move tests to development runtime * Hard code path in tests * Remove serve e2e tests * Add tests in production runtime
Fix for #14993. The issue was that I accidentally removed a check whether the URL matches the page's matchPath before explicitly navigating. I fixed and hopefully made the logic a bit easier to follow.