Skip to content

Commit

Permalink
fix: not span in Dependency trait
Browse files Browse the repository at this point in the history
  • Loading branch information
SyMind committed Sep 10, 2024
1 parent e1f9b66 commit 46ae3bb
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use rspack_core::{
AffectType, AsModuleDependency, Compilation, ContextDependency, ContextOptions,
ContextTypePrefix, Dependency, DependencyCategory, DependencyId, DependencyTemplate,
DependencyType, ErrorSpan, RealDependencyLocation, RuntimeSpec, TemplateContext,
TemplateReplaceSource,
DependencyType, RealDependencyLocation, RuntimeSpec, TemplateContext, TemplateReplaceSource,
};

use super::{context_dependency_template_as_id, create_resource_identifier_for_context_dependency};
Expand Down Expand Up @@ -42,8 +41,8 @@ impl Dependency for RequireResolveContextDependency {
&DependencyType::RequireContext
}

fn span(&self) -> Option<ErrorSpan> {
Some(ErrorSpan::new(self.range.start, self.range.end))
fn range(&self) -> Option<&RealDependencyLocation> {
Some(&self.range)
}

fn could_affect_referencing_module(&self) -> AffectType {
Expand Down

0 comments on commit 46ae3bb

Please sign in to comment.