Skip to content

Commit

Permalink
fix(react): pass configuration from context when reading build target…
Browse files Browse the repository at this point in the history
… options (#9656)

Closes #7924
  • Loading branch information
jaysoo committed Apr 1, 2022
1 parent 0182c6d commit cb4126c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/node/src/executors/node/node.impl.ts
Expand Up @@ -3,9 +3,9 @@ import {
joinPathFragments,
logger,
parseTargetString,
readCachedProjectGraph,
runExecutor,
} from '@nrwl/devkit';
import { readCachedProjectGraph } from '@nrwl/devkit';
import { calculateProjectDependencies } from '@nrwl/workspace/src/utilities/buildable-libs-utils';
import { ChildProcess, fork } from 'child_process';
import * as treeKill from 'tree-kill';
Expand Down Expand Up @@ -170,6 +170,9 @@ async function* startBuild(
) {
const buildTarget = parseTargetString(options.buildTarget);

// TODO(jack): [Nx 14] Remove this line once we generate `development` configuration by default + add migration for it if missing
buildTarget.configuration ??= '';

yield* await runExecutor<ExecutorEvent>(
buildTarget,
{
Expand Down
4 changes: 4 additions & 0 deletions packages/web/src/executors/dev-server/dev-server.impl.ts
Expand Up @@ -108,6 +108,10 @@ function getBuildOptions(
context: ExecutorContext
): WebWebpackExecutorOptions {
const target = parseTargetString(options.buildTarget);

// TODO(jack): [Nx 14] Remove this line once we generate `development` configuration by default + add migration for it if missing
target.configuration ??= '';

const overrides: Partial<WebWebpackExecutorOptions> = {
watch: false,
};
Expand Down

0 comments on commit cb4126c

Please sign in to comment.