mirror of
https://github.com/sunniejs/vue-h5-template.git
synced 2025-04-05 19:42:08 +08:00
15 lines
320 B
TypeScript
15 lines
320 B
TypeScript
/**
|
|
* @name ConfigPagesPlugin
|
|
* @description 动态生成路由
|
|
*/
|
|
|
|
import Pages from 'vite-plugin-pages';
|
|
export const ConfigPagesPlugin = () => {
|
|
return Pages({
|
|
pagesDir: [{ dir: 'src/pages', baseRoute: '' }],
|
|
extensions: ['vue', 'md'],
|
|
exclude: ['**/components/*.vue'],
|
|
nuxtStyle: true,
|
|
});
|
|
};
|