Replies: 2 comments
-
If I add too much support to this is kind of thing which is framework specific, will cause this plugin to become hard to maintain. |
Beta Was this translation helpful? Give feedback.
-
@hannoeru I don't think it is framework specific. Actually, merging custom data from page file with generated route from plugin in virtual module is feasible methods, which is what I do currently. I used // as a part of virtual module
const customs= import.meta.glob(
['~/pages/**/*.tsx', '!~/pages/**/components/*'],
{ import: 'route', eager: true },
); of course, it will throw error when the page file don't export named |
Beta Was this translation helpful? Give feedback.
-
Description
SFC custom block and JSX/TSX YAML format comments are not perfect method to custom route data, especially when I want to use imported data in route data:
Suggested solution
custom route data in runtime code is maybe better method, it has natural framework-independence advantage, and support type check:
Alternative
No response
Additional context
No response
Validations
Beta Was this translation helpful? Give feedback.
All reactions