diff --git a/build/plugins/index.ts b/build/plugins/index.ts index 67de5b33..1b118010 100644 --- a/build/plugins/index.ts +++ b/build/plugins/index.ts @@ -4,12 +4,12 @@ import vueJsx from '@vitejs/plugin-vue-jsx'; import unocss from '@unocss/vite'; import { VitePWA } from 'vite-plugin-pwa'; import progress from 'vite-plugin-progress'; +import routerPage from '@soybeanjs/router-page'; import html from './html'; import unplugin from './unplugin'; import mock from './mock'; import visualizer from './visualizer'; import compress from './compress'; -import soybeanjs from './soybeanjs'; /** * vite插件 @@ -25,7 +25,7 @@ export function setupVitePlugins(viteEnv: ImportMetaEnv): (PluginOption | Plugin unocss(), mock, progress(), - soybeanjs() + routerPage() ]; if (viteEnv.VITE_VISUALIZER === 'Y') { diff --git a/build/plugins/soybeanjs.ts b/build/plugins/soybeanjs.ts deleted file mode 100644 index 3886db11..00000000 --- a/build/plugins/soybeanjs.ts +++ /dev/null @@ -1,18 +0,0 @@ -import routerPage from '@soybeanjs/router-page'; - -export default function createSoybeanjsPlugin() { - return routerPage({ - pagesFormatter: names => { - /** 系统的内置路由,该文件夹名称不作为RouteKey */ - const SYSTEM_VIEW = 'system-view'; - - const result = names - .filter(name => name !== SYSTEM_VIEW) - .map(name => { - return name.replace(`${SYSTEM_VIEW}_`, ''); - }); - - return result; - } - }); -}