Skip to content

Commit

Permalink
fix: tsp.currentLibrary was not set (detail)
Browse files Browse the repository at this point in the history
Affects createProgram special instructions & tsExtras
  • Loading branch information
nonara committed Dec 5, 2023
1 parent 8bd441b commit 24d8031
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions projects/core/src/patch/patch-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,12 @@ export function patchModule(tsModule: TsModule, skipDts: boolean = false): { js:
}

/* Get JS */
const libraryName = tsModule.moduleName.replace(/\.js$/, '');
const patchDetail = PatchDetail.fromModule(tsModule, printedJs);
const js =
patchDetail.toHeader() + '\n' +
jsPatchSrc + '\n' +
`tsp.currentLibrary = '${libraryName}';\n`+
printedJs;

return { dts, js };
Expand Down

0 comments on commit 24d8031

Please sign in to comment.