summaryrefslogtreecommitdiff
path: root/cli/proc_state.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-02-14 16:48:27 +0100
committerGitHub <noreply@github.com>2023-02-14 16:48:27 +0100
commit1d00bbe47e2ca14e2d2151518e02b2324461a065 (patch)
treee099d0b4d872fe1af979842e1dcf929246836e77 /cli/proc_state.rs
parentb3c85c3548ac3c56f0cf0f3ace36a6f3de3bf823 (diff)
fix: loading built-in Node modules embedded in the binary (#17777)
Fixes bug introduced in ed3a7ce2f719e64e59cfebb3d131a05a1694523b that caused errors when loading built-in Node modules, when using "deno_graph".
Diffstat (limited to 'cli/proc_state.rs')
-rw-r--r--cli/proc_state.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/cli/proc_state.rs b/cli/proc_state.rs
index a146f24f4..0ab6b3754 100644
--- a/cli/proc_state.rs
+++ b/cli/proc_state.rs
@@ -534,6 +534,11 @@ impl ProcState {
match maybe_resolved {
Some((found_referrer, Resolution::Ok(resolved))) => {
let specifier = &resolved.specifier;
+
+ if specifier.scheme() == "node" {
+ return node::resolve_builtin_node_module(specifier.path());
+ }
+
if let Ok(reference) = NpmPackageReference::from_specifier(specifier)
{
if !self.options.unstable()