From e96379b6c034db1a88f461350ff46334d65f7922 Mon Sep 17 00:00:00 2001 From: "meilin.huang" <954537473@qq.com> Date: Mon, 7 Jul 2025 12:05:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20vite=E9=85=8D=E7=BD=AE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/package.json | 6 +++--- frontend/src/i18n/en/machine.ts | 2 +- frontend/src/i18n/zh-cn/machine.ts | 2 +- frontend/vite.config.ts | 24 +++++++----------------- 4 files changed, 12 insertions(+), 22 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 1f992d3d..e526826d 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -13,7 +13,7 @@ "@element-plus/icons-vue": "^2.3.1", "@logicflow/core": "^2.0.16", "@logicflow/extension": "^2.0.21", - "@vueuse/core": "^13.4.0", + "@vueuse/core": "^13.5.0", "@xterm/addon-fit": "^0.10.0", "@xterm/addon-search": "^0.15.0", "@xterm/addon-web-links": "^0.11.0", @@ -24,7 +24,7 @@ "crypto-js": "^4.2.0", "dayjs": "^1.11.13", "echarts": "^5.6.0", - "element-plus": "^2.10.2", + "element-plus": "^2.10.3", "js-base64": "^3.7.7", "jsencrypt": "^3.3.2", "mitt": "^3.0.1", @@ -40,7 +40,7 @@ "trzsz": "^1.1.5", "uuid": "^9.0.1", "vue": "^3.5.17", - "vue-i18n": "^11.1.7", + "vue-i18n": "^11.1.9", "vue-router": "^4.5.1", "vuedraggable": "^4.1.0" }, diff --git a/frontend/src/i18n/en/machine.ts b/frontend/src/i18n/en/machine.ts index 9c8f9d1d..d251b861 100644 --- a/frontend/src/i18n/en/machine.ts +++ b/frontend/src/i18n/en/machine.ts @@ -65,7 +65,7 @@ export default { processName: 'Process Name', selectSortType: 'Please select a sort type', selectProcessNum: 'Please select the number of processes', - cpuDesc: 'CUP descending', + cpuDesc: 'CPU descending', memDesc: 'Memory descending', virtualMemory: 'Virtual Memory', fixedMemory: 'Fixed Memory', diff --git a/frontend/src/i18n/zh-cn/machine.ts b/frontend/src/i18n/zh-cn/machine.ts index eedb8daf..e96e4067 100644 --- a/frontend/src/i18n/zh-cn/machine.ts +++ b/frontend/src/i18n/zh-cn/machine.ts @@ -66,7 +66,7 @@ export default { processName: '进程名', selectSortType: '请选择排序类型', selectProcessNum: '请选择进程个数', - cpuDesc: 'CUP降序', + cpuDesc: 'CPU降序', memDesc: '内存降序', virtualMemory: '虚拟内存', fixedMemory: '固定内存', diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index a96e31e5..11be88f1 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -50,28 +50,18 @@ const viteConfig: UserConfig = { }, build: { outDir: 'dist', - minify: 'esbuild', - sourcemap: false, chunkSizeWarningLimit: 1500, rollupOptions: { output: { - entryFileNames: `assets/[name]-[hash].js`, - chunkFileNames: `assets/[name]-[hash].js`, - assetFileNames: `assets/[name]-[hash].[ext]`, + entryFileNames: `assets/[hash]-[name].js`, + chunkFileNames: `assets/[hash]-[name].js`, + assetFileNames: `assets/[hash]-[name].[ext]`, + hashCharacters: 'hex', advancedChunks: { groups: [ - { - name: 'vue', - test: /(vue|vue-router|pinia)/i, - }, - { - name: 'echarts', - test: /(echarts)/i, - }, - { - name: 'monaco', - test: /(monaco-editor)/i, - }, + { name: 'vue-vendor', test: /[\\/]node_modules[\\/](vue|@vue|vue-router|pinia)[\\/]/ }, + { name: 'echarts', test: /(echarts)/i }, + { name: 'monaco', test: /(monaco-editor)/i }, ], }, },