解决 Vite8 升级后 dev 环境下首次打开重依赖路由(tinymce/echarts/vxe-table 等)时白屏、加载慢的问题

This commit is contained in:
JEECG 2026-07-17 11:09:19 +08:00
parent df83f4de76
commit 0930351bc0

View File

@ -86,6 +86,8 @@ export default async ({ command, mode }: ConfigEnv): Promise<UserConfig> => {
replacement: pathResolve('types') + '/',
},
],
// vue/
dedupe: ['vue', 'vue-router', 'pinia', '@vue/shared'],
},
server: {
// Listening on all local IPs
@ -178,8 +180,12 @@ export default async ({ command, mode }: ConfigEnv): Promise<UserConfig> => {
'@iconify/iconify',
'ant-design-vue/es/locale/zh_CN',
'ant-design-vue/es/locale/en_US',
// update-begin--author:scott---date:20260427---for: @jeecg/aiflow lib node_modules
// Vite node_modules mjs ant-design-vue/es/vc-picker/generate/dayjs.js
'tinymce',
'@tinymce/tinymce-vue',
'echarts',
'vxe-table',
'vxe-pc-ui',
'vxe-table-plugin-antd',
// dayjs UMD/CJS "does not provide an export named 'default'"
// vc-picker dayjs esbuild ESM
'dayjs/plugin/advancedFormat',
@ -188,8 +194,7 @@ export default async ({ command, mode }: ConfigEnv): Promise<UserConfig> => {
'dayjs/plugin/localeData',
'dayjs/plugin/weekOfYear',
'dayjs/plugin/weekYear',
'dayjs/plugin/quarterOfYear',
// update-end--author:scott---date:20260427---for: @jeecg/aiflow dayjs default
'dayjs/plugin/quarterOfYear'
],
exclude: [
//vite4onlineaiflow