Skip to content

Commit

Permalink
Merge pull request #91 from M00TSDNS/feat-import-keyword-commonjs
Browse files Browse the repository at this point in the history
Use `import = require()` for commonjs
  • Loading branch information
pjmolina authored Mar 3, 2023
2 parents f17e951 + e526aec commit 16fc0cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/passes/generate-ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -1449,7 +1449,7 @@ function generateTS(ast, options, session) {

if (dependencyVars.length > 0) {
dependencyVars.forEach(variable => {
parts.push("let " + variable +
parts.push("import " + variable +
" = require(\"" +
js.stringEscape(options.dependencies[variable]) +
"\");"
Expand Down

0 comments on commit 16fc0cd

Please sign in to comment.