From 923e6d8b429f136e2699c5fbcf81686e93120a3c Mon Sep 17 00:00:00 2001 From: Nicholas Cunningham Date: Mon, 29 May 2023 10:25:15 -0600 Subject: [PATCH] fix(js): set node_env when building with esbuild (#17251) --- packages/esbuild/src/executors/esbuild/esbuild.impl.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/esbuild/src/executors/esbuild/esbuild.impl.ts b/packages/esbuild/src/executors/esbuild/esbuild.impl.ts index 6b680dc8e9ea0..872d35b1a771b 100644 --- a/packages/esbuild/src/executors/esbuild/esbuild.impl.ts +++ b/packages/esbuild/src/executors/esbuild/esbuild.impl.ts @@ -41,6 +41,8 @@ export async function* esbuildExecutor( _options: EsBuildExecutorOptions, context: ExecutorContext ) { + process.env.NODE_ENV ??= context.configurationName; + const options = normalizeOptions(_options, context); if (options.deleteOutputPath) removeSync(options.outputPath);