From 01f95e6797c15310e4950b8acd39e23c33b3fcbe Mon Sep 17 00:00:00 2001 From: ahabhgk Date: Mon, 5 Aug 2024 20:25:22 +0800 Subject: [PATCH] fix --- crates/rspack_core/src/normal_module_factory.rs | 4 ++-- crates/rspack_core/src/options/externals.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/rspack_core/src/normal_module_factory.rs b/crates/rspack_core/src/normal_module_factory.rs index 1d91fd9371e..c61cd4dd0e7 100644 --- a/crates/rspack_core/src/normal_module_factory.rs +++ b/crates/rspack_core/src/normal_module_factory.rs @@ -638,7 +638,7 @@ impl NormalModuleFactory { Ok(rules) } - fn calculate_resolve_options(&self, module_rules: &[&ModuleRuleEffect]) -> Option> { + fn calculate_resolve_options(&self, module_rules: &[&ModuleRuleEffect]) -> Option> { let mut resolved: Option = None; for rule in module_rules { if let Some(rule_resolve) = &rule.resolve { @@ -649,7 +649,7 @@ impl NormalModuleFactory { } } } - resolved.map(Box::new) + resolved.map(Arc::new) } fn calculate_side_effects(&self, module_rules: &[&ModuleRuleEffect]) -> Option { diff --git a/crates/rspack_core/src/options/externals.rs b/crates/rspack_core/src/options/externals.rs index 8efa50c9ed6..7021ef10b5b 100644 --- a/crates/rspack_core/src/options/externals.rs +++ b/crates/rspack_core/src/options/externals.rs @@ -5,7 +5,7 @@ use rspack_error::Result; use rspack_regex::RspackRegex; use rustc_hash::FxHashMap as HashMap; -use crate::{Resolve, ResolveOptionsWithDependencyType, ResolverFactory}; +use crate::{ResolveOptionsWithDependencyType, ResolverFactory}; pub type Externals = Vec;