-
Notifications
You must be signed in to change notification settings - Fork 17
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
Is layouts/ directory useful? #16
Comments
There is not even a Btw., as a newbie to Vuetify I was also a bit confused about the different directories for components, being |
@istvank commented on Jan 29, 2023, 3:19 PM GMT+1:
No, as the template doesn't contain any.
Yes.
Those directories are just a "default" layout, they are not enforced anywhere. You can call them |
We used to have README.md files for each directory but that seems to be gone for whatever reason. |
With unplugin-vue-router, routes are automatically created for pages in src/pages, without using any layouts. |
Layouts are setup using https://github.com/JohnCampionJr/vite-plugin-vue-layouts which is compat with unplugin-vue-router. I believe this issue is outdated since it relates to an old version of the vuetify-create plugin. |
The latest create vuetify uses vite-plugin-vue-layouts with unplugin-vue-router. All it does in practice is wrap /layouts/default around every page without causing a nested route to be created. Not worthwhile IMO as it can just go in App.vue without having to deal with extra complexity. |
I agree, this is why we have different presets. Default / Base don't include layouts. Subsequently, I'm going to close this answer, ty all. |
I've noticed the creation of
layouts/
directories with 2 Vue files, that are referenced in the router configuration.However, they are not used, since the
main.ts
loadsApp.vue
that doesn't do anything with either<router-view />
nor those files inlayouts/
directory.The text was updated successfully, but these errors were encountered: