The below is my tsconfig:
{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "NodeNext",
"skipLibCheck": true,
"moduleResolution": "NodeNext",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
"jsxImportSource": "@kitajs/html",
"outDir": "dist",
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"types": [ "node"],
"plugins": [{ "name": "@kitajs/ts-html-plugin" }]
},
"include": ["src"]
}
And I simply have this code:
function Entry(props: PropsType) {
return (
<tr>
<td safe>{props.entry.id}</td>
<td safe>{props.entry.name}</td>
</tr>
);
}
It gives me this error:
Cannot find module '@kitajs/html/jsx-runtime' or its corresponding type declarations.ts(2307)
Which is correct because with NodeNext I need to use .js as a extension when importing files. How can I force typescript to add .js extension in automatic jsx runtime import it does???
Is this a bug in typescript?