diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-03-21 11:35:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-21 11:35:51 -0700 |
commit | 9abc722cc3a998b4f73103c4394b53cccdb5c83b (patch) | |
tree | 228a9eb9665439e52b9588830a80dd6c8ef1499e /cli/resolver.rs | |
parent | a90a6f3b291d2a30750c2578fc3763246a182dea (diff) |
feat(node): load ES modules defined as CJS (#22945)
Changes the behaviour in Deno to just always load ES modules in npm
packages even if they're defined as CJS.
Closes #22818
Diffstat (limited to 'cli/resolver.rs')
-rw-r--r-- | cli/resolver.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/resolver.rs b/cli/resolver.rs index 495b3f9b5..6594bf2d4 100644 --- a/cli/resolver.rs +++ b/cli/resolver.rs @@ -334,7 +334,7 @@ impl NpmModuleLoader { // translate cjs to esm if it's cjs and inject node globals self.node_code_translator.translate_cjs_to_esm( specifier, - Some(code.as_str()), + Some(code), permissions, )? } else { |