Files
vue-ts-example-2025/vite-plugins/01.vite-plugin-vue-meta-layouts.ts
严浩 25b3658576
All checks were successful
CI/CD Pipeline / playwright (push) Successful in 3m44s
CI/CD Pipeline / build-and-deploy (push) Successful in 4m7s
fix(build): set meta-layouts importMode to sync
2025-10-25 23:27:30 +08:00

14 lines
594 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import type { PluginOption } from 'vite';
import MetaLayouts from 'vite-plugin-vue-meta-layouts';
export default [
// https://github.com/dishait/vite-plugin-vue-meta-layouts
MetaLayouts({
// defaultLayout: 'sakai-vue/AppLayout',
// defaultLayout: 'naive-ui/AppLayout',
importMode: 'sync', // 默认为自动处理SSG 时为 sync非 SSG 时为 async
defaultLayout: 'base-layout/base-layout',
skipTopLevelRouteLayout: true, // 打开修复 https://github.com/JohnCampionJr/vite-plugin-vue-layouts/issues/134默认为 false 关闭
}),
] satisfies PluginOption;