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
feat: support layouts #56
Conversation
FYI, I have started work on a separate vite plugin for this. I think its different enough to separate from Vite-plugin-pages and this way different versions can iterate. If they should be merged at some point, we can do that later. |
I think is better to separate it to a different plugin. |
Now using new plugin. Probably some tweaks to be made there; open to suggestions. |
Actually, what I means is you can build a component to swap layout and pass vite's glob import in to it's props. |
I'm really confused now. I thought you wanted it in a different plugin. I've already built it as such. Can you add any more details to what you're suggesting now? Where would the component live? @antfu didn't want the infrastructure cluttering up Vitesse. |
Sorry about that, I just thinking about using vite plugin or use vite's glob import with a layout component. Both works. |
I used your great work as base to build the vite plugin with a virtual module. It creates the imports the same way Vite's glob import does and feeds them to a layout component it creates and then that wraps around the routes (generated by your plugin). |
Great, thanks! |
Sorry about that, I hit the wrong thing and screwed up my branch.
Closes #50
This is pre-plugin code for discussion. Willing to work on integrating with
Vite-plugin-pages
if @hannoeru is interested.If not, can refactor into Vite-plugin-layouts instead.