Skip to content

Commit 29f8241

Browse files
committed
refactor(@ngtools/webpack): use readConfiguration existingOptions instead of spread
1 parent 7169c74 commit 29f8241

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/ngtools/webpack/src/angular_compiler_plugin.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,14 @@ export class AngularCompilerPlugin {
179179
}
180180

181181
// Parse the tsconfig contents.
182-
const config = readConfiguration(this._tsConfigPath);
183-
if (config.errors && config.errors.length) {
184-
throw new Error(formatDiagnostics(config.errors));
182+
const { errors, rootNames, options: compilerOptions } = readConfiguration(this._tsConfigPath, options.compilerOptions);
183+
if (errors && errors.length) {
184+
throw new Error(formatDiagnostics(errors));
185185
}
186186

187-
this._rootNames = config.rootNames;
188-
this._compilerOptions = { ...config.options, ...options.compilerOptions };
189-
this._basePath = config.options.basePath || basePath || '';
187+
this._rootNames = rootNames;
188+
this._compilerOptions = compilerOptions;
189+
this._basePath = compilerOptions.basePath || basePath || '';
190190

191191
// Overwrite outDir so we can find generated files next to their .ts origin in compilerHost.
192192
this._compilerOptions.outDir = '';

0 commit comments

Comments
 (0)