Skip to content

Commit

Permalink
Merge pull request #129 from firatoezcan-2/main
Browse files Browse the repository at this point in the history
Handle process.env
  • Loading branch information
garronej authored Sep 30, 2024
2 parents 4c45185 + 79e8bb8 commit 9be2b56
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/denoifySingleFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ export function denoifySingleFileFactory(params: {} & ReturnType<typeof denoifyI
// Handle ignore comments
let modifiedSourceCode = dealWithDenoifyLineIgnoreSpecialComment(sourceCode);

// Handle process.env
modifiedSourceCode = modifiedSourceCode.replaceAll("process.env", "Deno.env.toObject()")

// Add support for Node builtins
for (const builtin of builtins) {
if (builtin.test(modifiedSourceCode)) {
Expand Down

0 comments on commit 9be2b56

Please # to comment.