-
-
Notifications
You must be signed in to change notification settings - Fork 2.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 dynamic routes for sites with subpath #2299
Conversation
🦋 Changeset detectedLatest commit: 9e8444b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✔️ Deploy Preview for astro-www ready! 🔨 Explore the source changes: ebf3026 🔍 Inspect the deploy log: https://app.netlify.com/sites/astro-www/deploys/61d0c06359b8ce0007006d28 😎 Browse the preview: https://deploy-preview-2299--astro-www.netlify.app |
✔️ Deploy Preview for astro-docs-2 ready! 🔨 Explore the source changes: ebf3026 🔍 Inspect the deploy log: https://app.netlify.com/sites/astro-docs-2/deploys/61d0c063ccae050008ed86fb 😎 Browse the preview: https://deploy-preview-2299--astro-docs-2.netlify.app |
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.
Great find, thanks for the fix! LGTM but will let another maintainer review/merge
This looks great, @tadeuzagallo can you run |
ebf3026
to
9e8444b
Compare
Done @matthewp. I amended the last commit, hopefully that's ok. |
Changes
The route being passed into
ssrOptions
included the configured site pathname and therefore failed to match any patterns in the available routes when trying to extract parameters. This made it so that every valid dynamic route would error withroute pattern matched, but no matching static path found.
Testing
I added tests for all the scenarios currently being tested under
Dynamic Routing
for both valid and invalid dynamic routes.Docs
No documentation changes should be required since it's only a bug fix.