jsxImportSource
resolution in config files
#15559
Labels
suggestion
suggestions for new features (yet to be agreed)
jsxImportSource
resolution in config files
#15559
Take the following example:
Currently in Deno such code would fail because the bare specifier "preact" can not be resolved from the config file module.
This is arguably a very rarely encountered edge case. I still think we should deal with it in some way. I can think of two ways:
jsxImportSource
relative to the config file location, and use the resolved specifier during emit. This poses the risk that the specifier may be resolved by the import map twice: once during emit, and once at runtime when the jsx import is actually loaded.jsxImportSource
up front at all. Emit the specifier exactly as specified in the config file into the source files. Resolve the specifier individually in every file, just like/** @jsxImportSource ... */
is handled.I prefer option 2, because it has less weird edge cases. Both may have surprising behavior when using a relative specifier in the config file. I think that is the least of all evils though.
The text was updated successfully, but these errors were encountered: