-
Couldn't load subscription status.
- Fork 403
chore(nextjs,astro,shared): Move path matcher logic to shared #5043
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(nextjs,astro,shared): Move path matcher logic to shared #5043
Conversation
🦋 Changeset detectedLatest commit: aca469a The changes in this PR will be included in the next version bump. This PR includes changesets to release 19 packages
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 |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Co-authored-by: Lennart <lekoarts@gmail.com>
Co-authored-by: Lennart <lekoarts@gmail.com>
Description
This PR moves the core path matcher logic living inside the
createRouteMatcherof our Astro and Next.js SDKs to shared package to avoid duplication and pave the way for other SDKs like Nuxt. We'd want to make it easy to adopt in other SDKs while keeping framework-specific handling separate.In Nuxt, it will be implemented like this to be used within pages:
and in a global nuxt route middleware, they can use it like so:
For API routes, a separate
createRouteMatcherwill be created that accepts an H3 EventResolves ECO-352
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change