mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 20:29:11 +00:00
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.
This commit is contained in:
parent
6bb72a8086
commit
33c4d45328
12 changed files with 79 additions and 42 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue