Rethinking Virtual Modules #43
Unanswered
BryceRussell
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, the virtual modules created for themes can look something like this:
But this pattern can have issues with script/styles leaks. An alternative could be to flatten a virtual module into multiple virtual modules with default exports
This can also be easier to type in some cases. For example, instead of typing images manually with
ImageMetadata
, we can rely on wildcard module types from Astro to type the image imports.Things to consider:
Beta Was this translation helpful? Give feedback.
All reactions