fix(angular): fix wrong tsconfig option name in webpack-dev-server implementation (#15765)
This commit is contained in:
parent
a91513d961
commit
f2fb4c85cf
@ -19,6 +19,13 @@ import { from } from 'rxjs';
|
|||||||
import { switchMap } from 'rxjs/operators';
|
import { switchMap } from 'rxjs/operators';
|
||||||
import { getRootTsConfigPath } from 'nx/src/utils/typescript';
|
import { getRootTsConfigPath } from 'nx/src/utils/typescript';
|
||||||
|
|
||||||
|
type BuildTargetOptions = {
|
||||||
|
tsConfig: string;
|
||||||
|
buildLibsFromSource?: boolean;
|
||||||
|
customWebpackConfig?: { path?: string };
|
||||||
|
indexFileTransformer?: string;
|
||||||
|
};
|
||||||
|
|
||||||
export function executeWebpackDevServerBuilder(
|
export function executeWebpackDevServerBuilder(
|
||||||
rawOptions: Schema,
|
rawOptions: Schema,
|
||||||
context: import('@angular-devkit/architect').BuilderContext
|
context: import('@angular-devkit/architect').BuilderContext
|
||||||
@ -38,7 +45,7 @@ export function executeWebpackDevServerBuilder(
|
|||||||
const buildTarget =
|
const buildTarget =
|
||||||
browserTargetProjectConfiguration.targets[parsedBrowserTarget.target];
|
browserTargetProjectConfiguration.targets[parsedBrowserTarget.target];
|
||||||
|
|
||||||
const buildTargetOptions = {
|
const buildTargetOptions: BuildTargetOptions = {
|
||||||
...buildTarget.options,
|
...buildTarget.options,
|
||||||
...(parsedBrowserTarget.configuration
|
...(parsedBrowserTarget.configuration
|
||||||
? buildTarget.configurations[parsedBrowserTarget.configuration]
|
? buildTarget.configurations[parsedBrowserTarget.configuration]
|
||||||
@ -83,13 +90,9 @@ export function executeWebpackDevServerBuilder(
|
|||||||
let dependencies: DependentBuildableProjectNode[];
|
let dependencies: DependentBuildableProjectNode[];
|
||||||
if (!buildLibsFromSource) {
|
if (!buildLibsFromSource) {
|
||||||
const { tsConfigPath, dependencies: foundDependencies } =
|
const { tsConfigPath, dependencies: foundDependencies } =
|
||||||
createTmpTsConfigForBuildableLibs(
|
createTmpTsConfigForBuildableLibs(buildTargetOptions.tsConfig, context, {
|
||||||
buildTargetOptions.buildTargetTsConfigPath,
|
target: parsedBrowserTarget.target,
|
||||||
context,
|
});
|
||||||
{
|
|
||||||
target: parsedBrowserTarget.target,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
dependencies = foundDependencies;
|
dependencies = foundDependencies;
|
||||||
|
|
||||||
// We can't just pass the tsconfig path in memory to the angular builder
|
// We can't just pass the tsconfig path in memory to the angular builder
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user