diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-08-24 14:54:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-24 14:54:20 +0200 |
commit | 5268fa0e0f34571f0fc615eb665747863aca311e (patch) | |
tree | 3c23531d8484e4821662bc822634eabb9862dd57 /cli/module_loader.rs | |
parent | f3bde1d53b4710fb526286e27af29a55f5da18c7 (diff) |
fix(unstable): various resolution bugs for npm: specifiers (#15546)
Co-authored-by: David Sherret <dsherret@gmail.com>
Diffstat (limited to 'cli/module_loader.rs')
-rw-r--r-- | cli/module_loader.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cli/module_loader.rs b/cli/module_loader.rs index 05dd5bd73..5d567f8c5 100644 --- a/cli/module_loader.rs +++ b/cli/module_loader.rs @@ -63,6 +63,13 @@ impl CliModuleLoader { &self, specifier: &ModuleSpecifier, ) -> Result<ModuleCodeSource, AnyError> { + if specifier.as_str() == "node:module" { + return Ok(ModuleCodeSource { + code: deno_runtime::deno_node::MODULE_ES_SHIM.to_string(), + found_url: specifier.to_owned(), + media_type: MediaType::JavaScript, + }); + } let graph_data = self.ps.graph_data.read(); let found_url = graph_data.follow_redirect(specifier); match graph_data.get(&found_url) { |