From 70306a8ef21ca76522e0ff1a4baa87d36fceea36 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Sun, 12 Oct 2025 13:28:27 +0800 Subject: [PATCH] revert --- rsbuild.config.ts | 116 +++++++++++++++++++++++----------------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/rsbuild.config.ts b/rsbuild.config.ts index 6ef7248..0b05d52 100644 --- a/rsbuild.config.ts +++ b/rsbuild.config.ts @@ -76,64 +76,64 @@ export default defineConfig(({ envMode }) => { performance: { chunkSplit: { strategy: "split-by-module", - override: { - cacheGroups: { - // ===== 核心框架层 (100+) ===== - // Vue 生态 - 框架基础,最高优先级 - vue: { - test: /[\\/]node_modules[\\/](vue|vue-router|pinia|@vue|@vueuse)[\\/]/, - name: "vendor-vue", - priority: 100, - }, - // ===== UI 层 (90+) ===== - // Naive UI 及其依赖 - 核心 UI 框架 - ui: { - test: /[\\/]node_modules[\\/](naive-ui|@css-render|css-render|seemly|vooks|vueuc|treemate|vdirs|evtd)[\\/]/, - name: "vendor-ui", - priority: 90, - }, - // ===== 编辑器层 (70-80) ===== - // CodeMirror - 代码编辑器(使用最频繁) - editor: { - test: /[\\/]node_modules[\\/](codemirror|@codemirror|vue-codemirror|y-codemirror\.next)[\\/]/, - name: "vendor-editor", - priority: 80, - }, - // Markdown 编辑器 - mdeditor: { - test: /[\\/]node_modules[\\/]md-editor-v3[\\/]/, - name: "vendor-mdeditor", - priority: 75, - }, - // WangEditor - 富文本编辑器 - wangeditor: { - test: /[\\/]node_modules[\\/]@wangeditor-next[\\/]/, - name: "vendor-wangeditor", - priority: 70, - }, - // ===== 功能库层 (50-60) ===== - // Chart.js - 图表库(按需加载) - charts: { - test: /[\\/]node_modules[\\/](chart\.js|vue-chartjs|@kurkle|canvas-confetti)[\\/]/, - name: "vendor-charts", - priority: 60, - }, - // Mermaid - 流程图库(按需加载) - mermaid: { - test: /[\\/]node_modules[\\/]mermaid[\\/]/, - name: "vendor-mermaid", - priority: 55, - }, - // ===== 通用层 (10) ===== - // 其他常用库 - 兜底分组 - common: { - test: /[\\/]node_modules[\\/]/, - name: "vendor-common", - priority: 10, - minChunks: 2, - }, - }, - }, + // override: { + // cacheGroups: { + // // ===== 核心框架层 (100+) ===== + // // Vue 生态 - 框架基础,最高优先级 + // vue: { + // test: /[\\/]node_modules[\\/](vue|vue-router|pinia|@vue|@vueuse)[\\/]/, + // name: "vendor-vue", + // priority: 100, + // }, + // // ===== UI 层 (90+) ===== + // // Naive UI 及其依赖 - 核心 UI 框架 + // ui: { + // test: /[\\/]node_modules[\\/](naive-ui|@css-render|css-render|seemly|vooks|vueuc|treemate|vdirs|evtd)[\\/]/, + // name: "vendor-ui", + // priority: 90, + // }, + // // ===== 编辑器层 (70-80) ===== + // // CodeMirror - 代码编辑器(使用最频繁) + // editor: { + // test: /[\\/]node_modules[\\/](codemirror|@codemirror|vue-codemirror|y-codemirror\.next)[\\/]/, + // name: "vendor-editor", + // priority: 80, + // }, + // // Markdown 编辑器 + // mdeditor: { + // test: /[\\/]node_modules[\\/]md-editor-v3[\\/]/, + // name: "vendor-mdeditor", + // priority: 75, + // }, + // // WangEditor - 富文本编辑器 + // wangeditor: { + // test: /[\\/]node_modules[\\/]@wangeditor-next[\\/]/, + // name: "vendor-wangeditor", + // priority: 70, + // }, + // // ===== 功能库层 (50-60) ===== + // // Chart.js - 图表库(按需加载) + // charts: { + // test: /[\\/]node_modules[\\/](chart\.js|vue-chartjs|@kurkle|canvas-confetti)[\\/]/, + // name: "vendor-charts", + // priority: 60, + // }, + // // Mermaid - 流程图库(按需加载) + // mermaid: { + // test: /[\\/]node_modules[\\/]mermaid[\\/]/, + // name: "vendor-mermaid", + // priority: 55, + // }, + // // ===== 通用层 (10) ===== + // // 其他常用库 - 兜底分组 + // common: { + // test: /[\\/]node_modules[\\/]/, + // name: "vendor-common", + // priority: 10, + // minChunks: 2, + // }, + // }, + // }, }, // 移除 console.log(生产环境) removeConsole: ["log"],