Closed iflamed closed 4 months ago
Hi @iflamed
Try:
export default defineConfig({
ssr: {
external: ['react', 'react-dom'] // <== add
},
plugins: [
react(),
build(),
devServer({
adapter,
entry: 'src/index.tsx'
})
]
})
Hi @iflamed
Try:
export default defineConfig({ ssr: { external: ['react', 'react-dom'] // <== add }, plugins: [ react(), build(), devServer({ adapter, entry: 'src/index.tsx' }) ] })
It works.
We should write this code in documents. Which place I should write it to?
It works.
Great.
We should write this code in documents. Which place I should write it to?
I think here is good:
https://github.com/honojs/middleware/blob/main/packages/react-renderer/README.md
I'm trying to use honojs with react on cloudflare-pages. After install the
npm i @hono/react-renderer
package and updatetsconfig.json
to react as below got an error.tsconfig.json file
vite.config.ts
filerenderer.tsx file
Node version:
v21.7.1
The error information after I run
npm run dev
: