Zero-config layouts
Drop standard Vue components into src/layouts and every page picks up default.vue automatically.
Router based layout plugin for Vite 8, Vue 3 and Vue Router 5.
vite-plugin-vue-layouts-next is a fork of vite-plugin-vue-layouts with improvements and fixes, supporting Vite 8, Vue 3 and Vue Router 5.
Layouts are stored in the /src/layouts folder by default and are standard Vue components with a <router-view></router-view> in the template. Pages without a layout specified use default.vue for their layout.
You can use route blocks to allow each page to determine its layout. The block below in a page will look for /src/layouts/users.vue for its layout.
<route lang="yaml">
meta:
layout: users
</route>Head to Getting Started to install it, or Why for the rationale behind the fork.