Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getCustomTransformers error message fix #1334

Merged
merged 1 commit into from
Jun 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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