Closed 0xBADDCAFE closed 3 months ago
Hi @0xBADDCAFE
In almost all cases, you should use jsxImportSource": "hono/jsx"
. If you want to optimize the build for client components, you can use jsxImportSource": "hono/jsx/dom"
for esbuild
or Vite.
I got it, thank you for quick response.
Referring to the Client Component, I set
jsxImportSource": "hono/jsx/dom"
in the tsconfig.json of the project created withnpx create hono@latest
. The build will succeed, but JSX will error on VSCode.Even in hono-jsx-dom-examples,
jsxImportSource": "hono/jsx/dom"
is set in tsconfig.json, but there is no JSX error in 4.0.0-rc3 used here. In this hono-jsx-dom-with-vite repository,jsxImportSource": "hono/jsx"
is set as is and esbuildjsxImportSource: 'hono/jsx/dom'
options are added in vite.config.ts. In this case, the build is successful and there are no errors in VSCode.I want to know which config should I use. What is the difference between “hono-jsx-dom-examples” (or the settings on the Client Component page) and “hono-jsx-dom-with-vite”?