summaryrefslogtreecommitdiff
path: root/cli/lsp/tsc.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/lsp/tsc.rs')
-rw-r--r--cli/lsp/tsc.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs
index b26fa57bc..353866513 100644
--- a/cli/lsp/tsc.rs
+++ b/cli/lsp/tsc.rs
@@ -3214,9 +3214,13 @@ fn op_script_names(state: &mut OpState) -> Vec<String> {
.filter_map(|dep| dep.get_type().or_else(|| dep.get_code())),
);
for specifier in specifiers {
- if seen.insert(specifier.as_str()) && documents.exists(specifier) {
- // only include dependencies we know to exist otherwise typescript will error
- result.push(specifier.to_string());
+ if seen.insert(specifier.as_str()) {
+ if let Some(specifier) = documents.resolve_redirected(specifier) {
+ // only include dependencies we know to exist otherwise typescript will error
+ if documents.exists(&specifier) {
+ result.push(specifier.to_string());
+ }
+ }
}
}
}