Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hai-x committed Jan 10, 2025
1 parent ab1b596 commit 64afaa4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/servicesHost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ function createWatchFactory(
}
return result;
}
``;

function invokeRecursiveDirectoryWatcher(
directory: string,
Expand Down Expand Up @@ -800,10 +799,14 @@ export function makeSolutionBuilderHost(
// The `configFilePath` is the same value that is used as the `project` parameter of
// `getCustomtransformers` below.
const project = options.configFilePath;
if (typeof project === "string") {
if (typeof project === 'string') {
// Custom transformers need a reference to the `typescript.Program`, that reference is
// unavailable during the the `getCustomTransformers` callback below.
const transformers = getCustomTransformers(instance.loaderOptions, result.getProgram(), result.getProgram);
const transformers = getCustomTransformers(
instance.loaderOptions,
result.getProgram(),
result.getProgram
);
customTransformers.set(project, transformers);
}
}
Expand Down

0 comments on commit 64afaa4

Please sign in to comment.