From 836eeb080ee6bc8b8b20ac430afe56e2dd0a6308 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Wed, 20 May 2026 11:32:06 +0800 Subject: [PATCH] =?UTF-8?q?H5=E5=8F=91=E8=A1=8C=E6=89=93=E5=8C=85=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E5=90=8E=E8=87=AA=E5=8A=A8=E6=89=93=E5=BC=80=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue.config.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vue.config.js b/vue.config.js index 7da20a9..34fe9a1 100644 --- a/vue.config.js +++ b/vue.config.js @@ -263,6 +263,15 @@ class VersionInjectPlugin { try { execSync(command, { stdio: 'inherit' }); console.log(`✅ H5 ZIP: ${zipFileName}`); + + // 打包成功后默认打开输出目录 + const openDir = h5Dir.replace(/'/g, "''"); + if (process.platform === 'win32') { + execSync(`explorer "${openDir}"`, { stdio: 'ignore' }); + } else { + execSync(`open "${openDir}"`, { stdio: 'ignore' }); + } + // 删除已打包的源目录 // fs.rmSync(targetDir, { recursive: true, force: true }); // console.log(`[H5Zip] 已删除源目录: ${outputDirName}`);