From a94abaf2a08c6603fe687ae1ae4a3b2881a60cc5 Mon Sep 17 00:00:00 2001 From: "Kent C. Dodds" Date: Fri, 16 Aug 2024 16:22:06 -0600 Subject: [PATCH] fix(build): default NODE_ENV to production Otherwise this gets set to the string "undefined" which helps nobody. --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index f269212..f0c16c7 100644 --- a/src/index.js +++ b/src/index.js @@ -182,7 +182,7 @@ async function bundleMDX({ publicPath: isWriting ? bundlePath : undefined, absWorkingDir: cwd, define: { - 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV), + 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV ?? 'production'), }, plugins: [ globalExternals({