satyarohith / sift

Sift is a routing and utility library for Deno Deploy.
https://deno.land/x/sift
MIT License
170 stars 14 forks source link

Question - Setting up sift JSX in `deno.jsonc` #51

Open deanveloper opened 2 years ago

deanveloper commented 2 years ago

It's possible to set up deno to use other JSX runtimes, as seen here - https://deno.land/manual@v1.17.1/jsx_dom/jsx

How would I change this so that deno "just works" with sift's jsx and h functions? I'd like to avoid explicitly importing h if possible.

Also, I'm running into another issue:
image

How would I go about fixing it so that types are imported properly?

deanveloper commented 2 years ago

Upon playing around with config.jsonc a bit more, it looks like the following config works (not actually tested):

{
    "compilerOptions": {
        "jsx": "preserve",
        "jsxImportSource": "https://deno.land/x/sift@0.4.2/mod.ts",
        "jsxFactory": "h",
        "jsxFragmentFactory": "Fragment"
    },
}

However this still doesn't resolve the JSX.IntrinsicElements issue.

deanveloper commented 2 years ago

it appears that even using the "catch-all" that Microsoft provides doesn't fix the JSX.IntrinsicElements issue: image