build(projects): update plugin config

This commit is contained in:
Soybean 2022-11-08 09:18:05 +08:00
parent cc00c8f03a
commit 6a344ff2c7
2 changed files with 2 additions and 20 deletions

View File

@ -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') {

View File

@ -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;
}
});
}