diff --git a/crates/rspack_core/src/compiler/make/repair/build.rs b/crates/rspack_core/src/compiler/make/repair/build.rs index 923a26ea96e..af4a8658c4f 100644 --- a/crates/rspack_core/src/compiler/make/repair/build.rs +++ b/crates/rspack_core/src/compiler/make/repair/build.rs @@ -219,13 +219,11 @@ impl Task for BuildResultTask { module.set_build_info(build_result.build_info); module.set_build_meta(build_result.build_meta); - let resolve_options = module.get_resolve_options(); module_graph.add_module(module); Ok(vec![Box::new(ProcessDependenciesTask { dependencies: all_dependencies, original_module_identifier: module_identifier, - resolve_options, })]) } } diff --git a/crates/rspack_core/src/compiler/make/repair/process_dependencies.rs b/crates/rspack_core/src/compiler/make/repair/process_dependencies.rs index 0d9fb3b1692..4e994e437ec 100644 --- a/crates/rspack_core/src/compiler/make/repair/process_dependencies.rs +++ b/crates/rspack_core/src/compiler/make/repair/process_dependencies.rs @@ -4,14 +4,13 @@ use super::{factorize::FactorizeTask, MakeTaskContext}; use crate::{ utils::task_loop::{Task, TaskResult, TaskType}, ContextDependency, DependencyId, DependencyType, ErrorSpan, Module, ModuleIdentifier, - ModuleProfile, NormalModuleSource, Resolve, + ModuleProfile, NormalModuleSource, }; #[derive(Debug)] pub struct ProcessDependenciesTask { pub original_module_identifier: ModuleIdentifier, pub dependencies: Vec, - pub resolve_options: Option>, } impl Task for ProcessDependenciesTask { @@ -23,7 +22,6 @@ impl Task for ProcessDependenciesTask { let Self { original_module_identifier, dependencies, - resolve_options, } = *self; let mut sorted_dependencies = HashMap::default(); let module_graph = @@ -114,7 +112,7 @@ impl Task for ProcessDependenciesTask { dependency, dependencies, is_entry: false, - resolve_options: resolve_options.clone(), + resolve_options: module.get_resolve_options(), resolver_factory: context.resolver_factory.clone(), loader_resolver_factory: context.loader_resolver_factory.clone(), options: context.compiler_options.clone(),