Skip to content

Commit 1cfb77c

Browse files
authored
getCustomTransformers error message fix (TypeStrong#1334)
1 parent c49e391 commit 1cfb77c

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v9.2.3
4+
5+
* [Fix error message for invalid getCustomTransformers modules](https://github.com/TypeStrong/ts-loader/issues/1334) - thanks @blaky
6+
37
## v9.2.2
48

59
* [Start consuming webpack loader types](https://github.com/TypeStrong/ts-loader/issues/1325) - thanks @johnnyreilly

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ts-loader",
3-
"version": "9.2.2",
3+
"version": "9.2.3",
44
"description": "TypeScript loader for webpack",
55
"main": "index.js",
66
"types": "dist",

src/instances.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ export function initializeInstance(
361361
throw new Error(
362362
`Custom transformers in "${
363363
instance.loaderOptions.getCustomTransformers
364-
}" should export a function, got ${typeof getCustomTransformers}`
364+
}" should export a function, got ${typeof customerTransformers}`
365365
);
366366
}
367367
getCustomTransformers = customerTransformers;
@@ -403,10 +403,10 @@ export function initializeInstance(
403403
instance,
404404
instance.configParseResult.projectReferences
405405
);
406-
instance.watchOfFilesAndCompilerOptions = instance.compiler.createWatchProgram(
407-
instance.watchHost
408-
);
409-
instance.builderProgram = instance.watchOfFilesAndCompilerOptions.getProgram();
406+
instance.watchOfFilesAndCompilerOptions =
407+
instance.compiler.createWatchProgram(instance.watchHost);
408+
instance.builderProgram =
409+
instance.watchOfFilesAndCompilerOptions.getProgram();
410410
instance.program = instance.builderProgram.getProgram();
411411

412412
instance.transformers = getCustomTransformers(instance.program);

0 commit comments

Comments
 (0)