Skip to content

Commit

Permalink
getCustomTransformers error message fix (#1334)
Browse files Browse the repository at this point in the history
  • Loading branch information
blaky authored Jun 6, 2021
1 parent c49e391 commit 1cfb77c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v9.2.3

* [Fix error message for invalid getCustomTransformers modules](https://github.com/TypeStrong/ts-loader/issues/1334) - thanks @blaky

## v9.2.2

* [Start consuming webpack loader types](https://github.com/TypeStrong/ts-loader/issues/1325) - thanks @johnnyreilly
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ts-loader",
"version": "9.2.2",
"version": "9.2.3",
"description": "TypeScript loader for webpack",
"main": "index.js",
"types": "dist",
Expand Down
10 changes: 5 additions & 5 deletions src/instances.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ export function initializeInstance(
throw new Error(
`Custom transformers in "${
instance.loaderOptions.getCustomTransformers
}" should export a function, got ${typeof getCustomTransformers}`
}" should export a function, got ${typeof customerTransformers}`
);
}
getCustomTransformers = customerTransformers;
Expand Down Expand Up @@ -403,10 +403,10 @@ export function initializeInstance(
instance,
instance.configParseResult.projectReferences
);
instance.watchOfFilesAndCompilerOptions = instance.compiler.createWatchProgram(
instance.watchHost
);
instance.builderProgram = instance.watchOfFilesAndCompilerOptions.getProgram();
instance.watchOfFilesAndCompilerOptions =
instance.compiler.createWatchProgram(instance.watchHost);
instance.builderProgram =
instance.watchOfFilesAndCompilerOptions.getProgram();
instance.program = instance.builderProgram.getProgram();

instance.transformers = getCustomTransformers(instance.program);
Expand Down

0 comments on commit 1cfb77c

Please sign in to comment.