Comments (3)
Hi @usualoma !
This is related to #43.
React is provided as CommonJS, so it cannot be run as-is in Vite. Therefore, you need to specify it in ssr.external
as follows.
export default defineConfig(({ mode }) => {
return {
ssr: {
external: ['react', 'react-dom']
},
plugins: [honox()]
}
})
from honox.
This is an example project using React!
https://github.com/yusukebe/honox-playground/tree/main/projects/react
from honox.
@yusukebe Thank you. I got it!
from honox.
Related Issues (20)
- Ignore files having `$` as a prefix for routes
- Idea: Route-based API ? HOT 1
- Does it support wasm? HOT 6
- Add documentation on how to use HonoX outside of Cloudflare HOT 2
- Internal server error: Can't find variable: require HOT 2
- honox + auth.js HOT 2
- `onClick` doesn't "work"
- Better `EventAttributes` types HOT 1
- Issue with Vite and @azure/storage-blob Package HOT 6
- Cloudflare dependencies is included when is not used HOT 1
- valtio not working HOT 2
- development server take too long time
- Unable to use cookies through `hono/cookie` HOT 3
- Can't merge type of props for React renderer
- Support CDN baseUrl in `<Script>`
- Documentation - Starter Template - No x-basic option in hono-create command HOT 2
- HMR support for react renderer
- Vite plugin for sitemap.xml generation in SSR mode for HonoX
- Where should static assets be stored?
- HTMX Compatibility HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from honox.