-
-
Notifications
You must be signed in to change notification settings - Fork 162
fix(create-pages): clean path mapping of pathless groups #1593
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
commit: |
this generates the correct mapping for paths using pathless groups fixes #1574
e945118
to
3c05dbd
Compare
const hasWildcard = pathSpec.some((spec) => spec.type === 'wildcard'); | ||
// remove pathless groups | ||
const cleanPathSpec = pathSpec.filter( | ||
(spec) => !(spec.type === 'literal' && spec.name.startsWith('(')), |
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 don't prefer this. Can you separate utils for define-router and create-pages? I hope to have separate files for each. Or only utils.ts should be for the define-router notion.
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.
how would you feel about moving the functions that are only used for create-pages just into the create-pages.ts file?
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.
Yes, that will be good.
this generates the correct mapping for paths using pathless groups
fixes #1574