From 1dd8a734ea7592aa944fc63e7cb49c4970be0c49 Mon Sep 17 00:00:00 2001 From: Yinhuan Yuan Date: Fri, 17 Jan 2025 22:58:29 -0500 Subject: [PATCH] fix: process.env.NODE_ENV error in bundling --- code/core/scripts/prep.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/core/scripts/prep.ts b/code/core/scripts/prep.ts index 895b8f049d32..9a100c628d33 100644 --- a/code/core/scripts/prep.ts +++ b/code/core/scripts/prep.ts @@ -115,6 +115,10 @@ async function run() { platform: 'browser', conditions: ['browser', 'module', 'import', 'default'], + + define: { + 'process.env.NODE_ENV': JSON.stringify('production'), + }, } satisfies EsbuildContextOptions; const nodeEsbuildOptions = {