From 7feb05c977fc4bf50d01482e0863fd9b1d5b56c1 Mon Sep 17 00:00:00 2001 From: Ralf Ulonska Date: Mon, 18 May 2026 11:06:08 +0200 Subject: [PATCH] vite.config.js aktualisiert --- vite.config.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/vite.config.js b/vite.config.js index 512c250..afb2a28 100644 --- a/vite.config.js +++ b/vite.config.js @@ -17,26 +17,26 @@ let alias = { } const conf = { - base: './', // index.html文件所在位置 - root: './', // js导入的资源路径,src + base: './', // index.html File Location + root: './', //The resource path imported by JavaScript (src) server: { open: true, port: process.env.VITE_DEV_PORT, proxy: { [process.env.VITE_SERVER_API]: { target: process.env.VITE_SERVER_PATH, - // rewrite: path => path.replace(/^\/api/, '/api'), //为了模拟 + // rewrite: path => path.replace(/^\/api/, '/api'), //In order to simulate changeOrigin: true, }, }, }, build: { target: 'es2020', - minify: 'esbuild', // 是否进行压缩,boolean | 'terser' | 'esbuild',默认使用 esbuild - manifest: false, // 是否产出maifest.json - sourcemap: false, // 是否产出soucemap.json + minify: 'esbuild', // Whether to perform compression. Type: `boolean | 'terser' | 'esbuild'`. Defaults to `esbuild`. + manifest: false, // Generate manifest.json? + sourcemap: false, // Whether to generate sourceMap.json emptyOutDir: true, - outDir: 'dist', // 产出目录 + outDir: 'dist', // Output Directory rollupOptions: { output: { manualChunks (id) { @@ -53,7 +53,7 @@ const conf = { return '__vendor' } }else if(id.includes('Gwen-admin/src')){ - //src 下的都打包到一起 不然很多小文件 + // Bundle everything under `src` together; otherwise, you'll end up with a multitude of small files. return 'gwen' } },