From 76660bbd6c4c56ee28b26d38cf65649265f77ed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=89=E9=9E=8B=E6=B2=A1=E5=8F=B7?= <308487730@qq.com> Date: Mon, 29 Nov 2021 11:27:53 +0800 Subject: [PATCH] fix: correct process.env.NODE_ENV --- scripts/watch.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/watch.mjs b/scripts/watch.mjs index 5970012..05098c1 100644 --- a/scripts/watch.mjs +++ b/scripts/watch.mjs @@ -16,6 +16,8 @@ const pkg = JSON.parse(readFileSync(join(process.cwd(), 'package.json'), 'utf8') */ function getWatcher({ name, configFile, writeBundle }) { return viteBuild({ + // Fix form 'vite-main.config.ts' and 'vite-preload.config.ts' + mode: process.env.NODE_ENV, // Options here precedence over configFile build: { watch: {},