Skip to content

Commit

Permalink
fix(webpack): ensure NODE_ENV is defaulted to development for dev-ser…
Browse files Browse the repository at this point in the history
…ver, and HMR works (#14915)
  • Loading branch information
jaysoo committed Feb 10, 2023
1 parent 496620e commit db7ee99
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/webpack/src/executors/dev-server/dev-server.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export async function* devServerExecutor(
serveOptions: WebDevServerOptions,
context: ExecutorContext
) {
// Default to dev mode so builds are faster and HMR mode works better.
process.env.NODE_ENV ??= 'development';

const { root: projectRoot, sourceRoot } =
context.projectsConfigurations.projects[context.projectName];
const buildOptions = normalizeOptions(
Expand Down

0 comments on commit db7ee99

Please sign in to comment.