Skip to content

Commit

Permalink
Merge pull request #1879 from zanminkian/zmj-fix
Browse files Browse the repository at this point in the history
fix(watch-compiler): merge compiler options with config file options
  • Loading branch information
kamilmysliwiec committed Feb 3, 2023
2 parents 019fa8a + 2bda3a3 commit 3821f6c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/compiler/watch-compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class WatchCompiler {
if (!configPath) {
throw new Error(CLI_ERRORS.MISSING_TYPESCRIPT(configFilename));
}
const { projectReferences } =
const { options, projectReferences } =
this.tsConfigProvider.getByConfigFilename(configFilename);

const createProgram = tsBin.createEmitAndSemanticDiagnosticsBuilderProgram;
Expand All @@ -44,7 +44,10 @@ export class WatchCompiler {
);
const host = tsBin.createWatchCompilerHost(
configPath,
tsCompilerOptions,
{
...options,
...tsCompilerOptions,
},
tsBin.sys,
createProgram,
this.createDiagnosticReporter(origDiagnosticReporter),
Expand Down

0 comments on commit 3821f6c

Please sign in to comment.