Skip to content

Commit

Permalink
fix(web): default react builds to production when NODE_ENV is not pro…
Browse files Browse the repository at this point in the history
…vided (nrwl#7727)

ISSUES CLOSED: nrwl#7410
  • Loading branch information
ndcunningham authored Nov 15, 2021
1 parent 3d54a79 commit 6e801a1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/web/src/executors/build/build.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ export async function* run(
`Node version ${nodeVersion} is not supported. Supported range is "${supportedRange.raw}".`
);
}

process.env.NODE_ENV ||= 'production';

const metadata = context.workspace.projects[context.projectName];

if (!options.buildLibsFromSource && context.targetName) {
Expand Down

0 comments on commit 6e801a1

Please sign in to comment.