Skip to content

Commit 2da40c6

Browse files
committed
remove npm_resolver
1 parent ae6a90e commit 2da40c6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/graph.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2506,7 +2506,7 @@ impl ModuleGraph {
25062506
npm_root_dir: &ModuleSpecifier,
25072507
resolution_kind: ResolutionKind,
25082508
loader: &'a dyn Loader,
2509-
options: BuildOptions<'a>,
2509+
mut options: BuildOptions<'a>,
25102510
) {
25112511
let resolver = options.resolver;
25122512
let jsr_url_provider = options.jsr_url_provider;
@@ -2619,6 +2619,10 @@ impl ModuleGraph {
26192619
.retain(|_, slot| !matches!(slot, ModuleSlot::Module(Module::Npm(_))));
26202620
self.redirects.retain(|_, to| to.scheme() != "npm");
26212621

2622+
// remove the npm resolver if it was specified because we
2623+
// don't want to resolve npm specifiers anymore
2624+
options.npm_resolver.take();
2625+
26222626
// load newly resolved specifiers and their transitive dependencies
26232627
let mut builder = Builder::new(self, loader, options);
26242628
for new in &new_specifiers {

0 commit comments

Comments
 (0)