f
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import vueJsx from '@vitejs/plugin-vue-jsx';
|
||||
import consola from 'consola';
|
||||
import { getPascalCaseRouteName } from 'unplugin-vue-router';
|
||||
import vueRouter from 'unplugin-vue-router/vite';
|
||||
import type { PluginOption } from 'vite';
|
||||
@@ -18,8 +19,13 @@ export default [
|
||||
exclude: ['**/__*', '**/__*/**/*'],
|
||||
extensions: ['.page.vue', '.page.md'],
|
||||
getRouteName: (routeNode) => getPascalCaseRouteName(routeNode),
|
||||
logs: false,
|
||||
routesFolder: 'src/pages',
|
||||
logs: true,
|
||||
routesFolder: ['src/pages', 'src/pages-with-layout'],
|
||||
extendRoute(route) {
|
||||
consola.info(`route.name :>> `, route.name);
|
||||
console.debug(`route.meta :>> `, route.meta);
|
||||
console.debug(`route.path :>> `, route.path);
|
||||
},
|
||||
}),
|
||||
},
|
||||
}),
|
||||
|
||||
@@ -17,6 +17,8 @@ export async function loadPlugins(configEnv: ConfigEnv): Promise<PluginOption[]>
|
||||
ignore: [
|
||||
'**/*.d.ts',
|
||||
'**/*.disabled.ts',
|
||||
'**/*.x.ts',
|
||||
'**/*.X.ts',
|
||||
'**/x-*.ts', // 禁用以 x- 开头的插件文件
|
||||
'**/_*',
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user