diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-10-14 23:57:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-15 03:57:31 +0000 |
commit | ae6a2b23bae83795bd973414216a89c839dd8fda (patch) | |
tree | 648bc0f65e9fa41de5f75188f87473d37912f291 /cli/worker.rs | |
parent | 7f3747f2ef7cc9e1d45aa33360afdfe62cd20c56 (diff) |
fix: do not panic running remote cjs module (#26259)
Instead error.
Diffstat (limited to 'cli/worker.rs')
-rw-r--r-- | cli/worker.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/worker.rs b/cli/worker.rs index 489b2dd93..e230197d2 100644 --- a/cli/worker.rs +++ b/cli/worker.rs @@ -552,7 +552,8 @@ impl CliMainWorkerFactory { .await?; self.shared.cjs_resolution_store.is_known_cjs(&main_module) } else { - specifier_has_extension(&main_module, "cjs") + main_module.scheme() == "file" + && specifier_has_extension(&main_module, "cjs") }; (main_module, is_cjs) }; |