Closed luukbrauckmann closed 4 months ago
This is not really a bug, Astro components are internally TSX and thus require the jsx
config to be set, because TypeScript does not support JSX otherwise. Last time I checked we couldn't really force enable it for users, but maybe this changed.
Interesting. I don't have this issue with Svelte and their extension. Maybe you can look at what they do to prevent this error.
Thanks for your reply. I'll use the workaround for now!
Describe the Bug
I'm exporting the
Icon.astro
component in anindex.ts
file likeexport { default } from './Icon.astro';
. This causes a red line under the file path./Icon.astro
. When I hover over there line I get the following errorModule './Icon.astro' was resolved to '<path_to_component>/Icon.astro', but '--jsx' is not set. ts(6142)
.Steps to Reproduce
npm create astro@latest
using template Empty with TypescriptIcon.astro
component.index.ts
.Icon.astro
from theindex.ts
likeexport { default } from './Icon.astro';
./Icon.astro
.