Skip to content

Is it possible to mix with classic routes? #185

Closed Answered by posva
ByScripts asked this question in Q&A
Discussion options

You must be logged in to vote

While not documented yet, you can pass a beforeWriteFiles option to the unplugin in your vite config to add routes manually at build time. These will be also typed.

Any route added at runtime cannot be typed. In order for your types to be useful, you should let the plugin handle all (or almost all) of your routes, otherwise you lose the type safety. The plugin should expose enough options to scan for different folders though. I need to add more docs but the code has a lot of documentation so using auto complete in your IDE should show you a lot of help, especially with the config which is not fully documented in the readme but is in the source

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@yakobe
Comment options

@posva
Comment options

Answer selected by posva
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants