Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Dec 15, 2022
1 parent 446a159 commit 48582bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/build/modify-typescript-module.mjs
Expand Up @@ -113,7 +113,7 @@ class TypeScriptModuleSource {

function unwrap(text) {
const startMark = "var ts = (() => {";
const endMark = "return __toCommonJS(typescript_exports);";
const endMark = "return require_typescript();";
const start = text.indexOf(startMark);
const end = text.lastIndexOf(endMark);

Expand Down Expand Up @@ -249,7 +249,7 @@ function modifyTypescriptModule(text) {
end: "});",
});

source.append("module.exports = __toCommonJS(typescript_exports);");
source.append("module.exports = require_typescript();");

return source.toString();
}
Expand Down

0 comments on commit 48582bb

Please sign in to comment.