Skip to content

Commit

Permalink
feat(projects): add new route plugin @soybeanjs/vite-plugin-vue-page-…
Browse files Browse the repository at this point in the history
…route [集成新的路由插件]
  • Loading branch information
honghuangdc committed Jan 15, 2023
1 parent f71812d commit 3131e00
Show file tree
Hide file tree
Showing 9 changed files with 357 additions and 172 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ VITE_APP_TITLE=Soybean管理系统
VITE_APP_DESC=SoybeanAdmin是一个中后台管理系统模版

# 权限路由模式: static | dynamic
VITE_AUTH_ROUTE_MODE=dynamic
VITE_AUTH_ROUTE_MODE=static

# 路由首页(根路由重定向), 用于static模式的权限路由,dynamic模式取决于后端返回的路由首页
VITE_ROUTE_HOME_PATH=/dashboard/analysis
Expand Down
4 changes: 2 additions & 2 deletions build/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx';
import unocss from '@unocss/vite';
import progress from 'vite-plugin-progress';
import routerPage from '@soybeanjs/router-page';
import pageRoute from '@soybeanjs/vite-plugin-vue-page-route';
import html from './html';
import unplugin from './unplugin';
import mock from './mock';
Expand All @@ -16,7 +16,7 @@ import pwa from './pwa';
* @param viteEnv - 环境变量配置
*/
export function setupVitePlugins(viteEnv: ImportMetaEnv): (PluginOption | PluginOption[])[] {
const plugins = [vue(), vueJsx(), html(viteEnv), ...unplugin(viteEnv), unocss(), mock, progress(), routerPage()];
const plugins = [vue(), vueJsx(), html(viteEnv), ...unplugin(viteEnv), unocss(), mock, progress(), pageRoute()];

if (viteEnv.VITE_VISUALIZER === 'Y') {
plugins.push(visualizer as PluginOption);
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"qs": "^6.11.0",
"swiper": "^8.4.5",
"ua-parser-js": "^1.0.32",
"vditor": "^3.8.18",
"vditor": "^3.9.0",
"vue": "3.2.45",
"vue-i18n": "^9.2.2",
"vue-router": "^4.1.6",
Expand All @@ -85,10 +85,10 @@
},
"devDependencies": {
"@amap/amap-jsapi-types": "^0.0.10",
"@iconify/json": "^2.2.6",
"@iconify/json": "^2.2.7",
"@iconify/vue": "^4.0.2",
"@soybeanjs/cli": "^0.1.6",
"@soybeanjs/router-page": "1.0.3",
"@soybeanjs/vite-plugin-vue-page-route": "^0.0.5",
"@types/bmapgl": "^0.0.5",
"@types/crypto-js": "^4.1.1",
"@types/node": "18.11.18",
Expand All @@ -100,7 +100,7 @@
"@vitejs/plugin-vue-jsx": "^3.0.0",
"conventional-changelog": "^3.1.25",
"cross-env": "^7.0.3",
"eslint": "^8.31.0",
"eslint": "^8.32.0",
"eslint-config-soybeanjs-vue": "^0.2.2",
"lint-staged": "12.5.0",
"mockjs": "^1.1.0",
Expand Down
Loading

0 comments on commit 3131e00

Please sign in to comment.