Skip to content
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

Extract name and path from definePage() #74

Closed
posva opened this issue Oct 5, 2022 · 6 comments
Closed

Extract name and path from definePage() #74

posva opened this issue Oct 5, 2022 · 6 comments

Comments

@posva
Copy link
Owner

posva commented Oct 5, 2022

Currently, name and path defined through definePage() are not added to the types like it happens with the route block but it should be possible since they are extracted through the AST

@posva posva added the bug label Oct 5, 2022
@hi-reeve
Copy link
Contributor

any estimated time to fix on this? trying definePage today, but got error because it does not added to typed-router.d.ts

@posva
Copy link
Owner Author

posva commented Oct 17, 2022

This turns out to be really tricky: got the extraction working but I still have a few bugs to fix. I recommend you to stick to the <route> block for the moment. Note that definePage only accepts literals values as so:

definePage({ name: 'must be literal' })

I need to ensure that having imports doesn't have a huge impact on performance

@hi-reeve
Copy link
Contributor

This turns out to be really tricky: got the extraction working but I still have a few bugs to fix. I recommend you to stick to the <route> block for the moment. Note that definePage only accepts literals values as so:

definePage({ name: 'must be literal' })

I need to ensure that having imports doesn't have a huge impact on performance

all right! thanks :D

@hi-reeve
Copy link
Contributor

any update on this? @posva

Copy link
Owner Author

posva commented Dec 22, 2022

I haven't been able to work on this feature again yet

@hi-reeve
Copy link
Contributor

I haven't been able to work on this feature again yet

all right, i hope this been fixed soon since it's really better to wrote everything using definePage() function rather than route block

@posva posva closed this as completed in dffcc61 Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants