Skip to content

Commit 1f5b1e0

Browse files
authored
fix: pass transformers object to ts.transpileModule method (Fixes #1051) (#1054)
* fix: pass transformers object to ts.transpileModule method * refactor: move typeof factory check to its original position
1 parent e567002 commit 1f5b1e0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,8 @@ export function create (rawOptions: CreateOptions = {}): Register {
491491
const result = ts.transpileModule(code, {
492492
fileName,
493493
compilerOptions: overrideCompilerOptions ? { ...config.options, ...overrideCompilerOptions } : config.options,
494-
reportDiagnostics: true
494+
reportDiagnostics: true,
495+
transformers: transformers as Exclude<typeof transformers, Function>
495496
})
496497

497498
const diagnosticList = filterDiagnostics(result.diagnostics || [], ignoreDiagnostics)

0 commit comments

Comments
 (0)