perf: 优化旧版浏览器页面恢复与资源加载

- 页面恢复时延后版本检查并补齐根背景,减少白闪与首帧卡顿

- 面向 Chrome 90 收敛公共分包,按需加载资源弹窗和知识库面板

- 压缩工作流图标并补充延迟加载与可见性生命周期测试
This commit is contained in:
2026-07-31 16:11:14 +08:00
parent 5c29ca9407
commit 12080ceedb
15 changed files with 505 additions and 68 deletions

View File

@@ -1,13 +1,40 @@
import { fileURLToPath } from 'node:url';
import { defineConfig } from '@easyflow/vite-config';
import ElementPlus from 'unplugin-element-plus/vite';
import { createBasePathRedirectPlugin } from './vite-base-path-redirect';
const resourceListChunkEntries = [
'./src/components/headerSearch/HeaderSearch.vue',
'./src/components/page/CardList.vue',
'./src/components/page/PageData.vue',
'./src/components/page/PageSide.vue',
].map((file) => fileURLToPath(new URL(file, import.meta.url)));
function isResourceListModule(id: string) {
return resourceListChunkEntries.some(
(entry) => id === entry || id.startsWith(`${entry}?`),
);
}
export default defineConfig(async () => {
return {
application: {},
vite: {
build: {
rollupOptions: {
output: {
manualChunks(id) {
if (isResourceListModule(id)) {
return 'resource-list';
}
},
onlyExplicitManualChunks: true,
},
},
},
resolve: {
alias: {
// @vueuse/motion expects tslib default export during dev pre-bundling