Skip to content

Commit

Permalink
fix: process dependencies task remove resolve_options
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrykingxyz committed Apr 26, 2024
1 parent 5b8dd1d commit 32bcf89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions crates/rspack_core/src/compiler/make/repair/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,11 @@ impl Task<MakeTaskContext> 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,
})])
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<DependencyId>,
pub resolve_options: Option<Box<Resolve>>,
}

impl Task<MakeTaskContext> for ProcessDependenciesTask {
Expand All @@ -23,7 +22,6 @@ impl Task<MakeTaskContext> for ProcessDependenciesTask {
let Self {
original_module_identifier,
dependencies,
resolve_options,
} = *self;
let mut sorted_dependencies = HashMap::default();
let module_graph =
Expand Down Expand Up @@ -114,7 +112,7 @@ impl Task<MakeTaskContext> 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(),
Expand Down

0 comments on commit 32bcf89

Please sign in to comment.