Skip to content

vite-plugin-vue-layouts-nextRouter based layouts for Vue

Router based layout plugin for Vite 8, Vue 3 and Vue Router 5.

What is it? ​

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.

vue
<route lang="yaml">
meta:
  layout: users
</route>

Head to Getting Started to install it, or Why for the rationale behind the fork.

Released under the MIT License.