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/main.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/main.rs')
-rw-r--r-- | cli/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/main.rs b/cli/main.rs index b784ed3d5..ead113697 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -457,8 +457,8 @@ async fn create_graph_and_maybe_check( ps.maybe_import_map.clone().map(ImportMapResolver::new); let maybe_jsx_resolver = ps .options - .to_maybe_jsx_import_source_module() - .map(|im| JsxResolver::new(im, maybe_import_map_resolver.clone())); + .to_maybe_jsx_import_source_config() + .map(|cfg| JsxResolver::new(cfg, maybe_import_map_resolver.clone())); let maybe_resolver = if maybe_jsx_resolver.is_some() { maybe_jsx_resolver.as_ref().map(|jr| jr.as_resolver()) } else { |