-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
My deno code contains jsx tags like: <div>hello world</div. I have configured my project to use React from npm, and use the automatic runtime, like so:
{
"imports": {
"react": "npm:react@18.2.0",
"react/jsx-runtime": "npm:react@18.2.0/jsx-runtime"
},
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "react"
}
}This setup works well locally as well as on Deno Deploy. However, when I try to compile this code with dnt, I get a bunch of these errors: error TS2686: 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead.
The problem here is that dnt uses a hard-coded jsx compiler option value, and doesn't let me overwrite it:
Lines 284 to 286 in 2d1d120
| jsx: ts.JsxEmit.React, | |
| jsxFactory: "React.createElement", | |
| jsxFragmentFactory: "React.Fragment", |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers