From 3c03d44a3a3c1fec7d01815e0be51fdd8c92e990 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期二, 10 六月 2025 09:53:36 +0800 Subject: [PATCH] Merge branch 'refs/heads/dev' into dev_ztns --- vue.config.js | 28 ++++++++++++++++++++++------ 1 files changed, 22 insertions(+), 6 deletions(-) diff --git a/vue.config.js b/vue.config.js index a760992..b86dc03 100644 --- a/vue.config.js +++ b/vue.config.js @@ -61,17 +61,33 @@ }, module: { rules: [ + // JS 涓讳綋鏂囦欢澶勭悊锛堝惈 Babel銆乀hread Loader锛� + { + test: /\.js$/, + use: [ + { + loader: 'thread-loader', + options: { workers: 4 } + }, + 'babel-loader' + ], + exclude: /\.worker\.js$/, // 馃憟 鎺掗櫎 worker 鏂囦欢 + include: path.resolve(__dirname, 'src') + }, + + // 鍗曠嫭澶勭悊 Worker 鏂囦欢 { test: /\.worker\.js$/, use: { - loader: "worker-loader", + loader: 'worker-loader', options: { - filename: "[name].[contenthash].worker.js", // 娣诲姞鍐呭鍝堝笇鍒版枃浠跺悕 - inline: "fallback", - }, + filename: '[name].[contenthash].worker.js', + inline: 'fallback' + } }, - }, - ], + type: 'javascript/auto' // 馃憟 寮哄埗 Webpack 涓嶈鎸夋ā鍧楄В鏋� + } + ] }, plugins: [ // http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#浣跨敤gzip瑙e帇缂╅潤鎬佹枃浠� -- Gitblit v1.9.3