Skip to content

Commit

Permalink
chore(build): clean log
Browse files Browse the repository at this point in the history
  • Loading branch information
buqiyuan committed Mar 9, 2024
1 parent b427294 commit 49e4270
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/router/helper/routeHelper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import outsideLayout from '../routes/outsideLayout';
import type { RouteMeta, RouteRecordRaw } from 'vue-router';
import IFramePage from '@/components/basic/iframe-page';
import { warn } from '@/utils/log';
import ComponentNotFound from '@/views/error/comp-not-found.vue';
import { rootRoute } from '@/router/routes';
import router from '@/router';
import basic from '@/router/routes/basic';
Expand All @@ -30,7 +29,7 @@ export const transformMenuToRoutes = (routeList: RouteRecordRaw[]) => {
route.component = asyncRoutes[compPath];
// 前端 src/views 目录下无对应路由组件
if (!route.component) {
route.component = ComponentNotFound;
route.component = () => import('@/views/error/comp-not-found.vue');
warn(`在src/views/下找不到 ${compPath}.vue 或 ${compPath}.tsx, 请自行创建!`);
}
}
Expand Down
2 changes: 2 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
return 'vendor';
} else if (id.includes('ant-design-vue')) {
return 'vendor';
} else if (id.includes('/src/api/index.ts')) {
return 'api';
}
},
},
Expand Down

0 comments on commit 49e4270

Please sign in to comment.