diff options
author | Luca Casonato <hello@lcas.dev> | 2022-08-24 19:36:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-24 19:36:05 +0200 |
commit | 33c4d45328166d103e99a8c243727eead626080c (patch) | |
tree | 70331a9964f8faf780942696c34aab867accf7bf /cli/lsp/documents.rs | |
parent | 6bb72a80863ac3913d32ea21aae32dd327ce6b71 (diff) |
fix: resolve `jsxImportSource` relative to module (#15561)
Previously `jsxImportSource` was resolved relative to the config file
during graph building, and relative to the emitted module during
runtime.
This is now fixed so that the JSX import source is resolved relative to
the module both during graph building and at runtime.
Diffstat (limited to 'cli/lsp/documents.rs')
-rw-r--r-- | cli/lsp/documents.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/lsp/documents.rs b/cli/lsp/documents.rs index 18c3710fb..0fa85c095 100644 --- a/cli/lsp/documents.rs +++ b/cli/lsp/documents.rs @@ -998,8 +998,8 @@ impl Documents { // TODO(@kitsonk) update resolved dependencies? self.maybe_import_map = maybe_import_map.map(ImportMapResolver::new); self.maybe_jsx_resolver = maybe_config_file.and_then(|cf| { - cf.to_maybe_jsx_import_source_module() - .map(|im| JsxResolver::new(im, self.maybe_import_map.clone())) + cf.to_maybe_jsx_import_source_config() + .map(|cfg| JsxResolver::new(cfg, self.maybe_import_map.clone())) }); self.imports = Arc::new( if let Some(Ok(Some(imports))) = |