summaryrefslogtreecommitdiff
path: root/cli/module_graph.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/module_graph.rs')
-rw-r--r--cli/module_graph.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/module_graph.rs b/cli/module_graph.rs
index 8ec439a8e..8689072f0 100644
--- a/cli/module_graph.rs
+++ b/cli/module_graph.rs
@@ -386,10 +386,11 @@ impl Module {
for desc in dependencies.iter().filter(|desc| {
desc.kind != swc_ecmascript::dep_graph::DependencyKind::Require
}) {
+ let loc = parsed_module.source_map.lookup_char_pos(desc.span.lo);
let location = Location {
filename: self.specifier.to_string(),
- col: desc.col,
- line: desc.line,
+ col: loc.col_display,
+ line: loc.line,
};
// In situations where there is a potential issue with resolving the