diff --git a/packages/frontend-shared/vite.config.mjs b/packages/frontend-shared/vite.config.mjs index 23091e841d10..eed1f9bde892 100644 --- a/packages/frontend-shared/vite.config.mjs +++ b/packages/frontend-shared/vite.config.mjs @@ -150,6 +150,7 @@ export const makeConfig = (config = {}, plugins = {}) => { define: { 'process.env': { CYPRESS_INTERNAL_ENV: 'development', + NODE_ENV: process.env.NODE_ENV, }, // Fix to get cypress-plugin-tab to work in CT 'process.version': '99', diff --git a/scripts/gulp/tasks/gulpVite.ts b/scripts/gulp/tasks/gulpVite.ts index af1ca14fe9fb..32c1a5ad2920 100644 --- a/scripts/gulp/tasks/gulpVite.ts +++ b/scripts/gulp/tasks/gulpVite.ts @@ -102,10 +102,6 @@ export function viteBuildApp () { export function viteBuildAndWatchApp () { return watchViteBuild('vite:build-watch-app', `yarn vite build --watch`, { cwd: monorepoPaths.pkgApp, - env: { - // ...process.env, - NODE_ENV: 'production', - }, }) } @@ -113,6 +109,9 @@ export function viteBuildLaunchpad () { return spawned('vite:build-launchpad', `yarn vite build --outDir dist`, { cwd: monorepoPaths.pkgLaunchpad, waitForExit: true, + env: { + NODE_ENV: 'production', + }, }) }