grasscutterTools/config/vite/plugins/pages.ts
2022-05-02 18:38:10 +08:00

13 lines
335 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,
})
}