summaryrefslogtreecommitdiff
path: root/cli/module_graph.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2021-07-14 21:28:01 -0400
committerGitHub <noreply@github.com>2021-07-14 21:28:01 -0400
commit79ac050d2917ddc1be97e458c8ac7c6a3d728269 (patch)
treed441fdc8a9c7eda2498cf8d4b69c32ea196db06c /cli/module_graph.rs
parent69ca44d8e229255760740432ba5d2f95860a66bb (diff)
chore: upgrade to swc 0.46 (#11402)
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