Skip to content

Commit

Permalink
docs(readme): update
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukebe committed Sep 16, 2024
1 parent cd6bd56 commit 45019e4
Showing 1 changed file with 26 additions and 11 deletions.
37 changes: 26 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ Configure react in `vite.config.ts`.

```ts
// vite.config.ts
import pages from '@hono/vite-cloudflare-pages'
import build from '@hono/vite-build/cloudflare-pages'
import honox from 'honox/vite'
import { defineConfig } from 'vite'
Expand All @@ -505,18 +505,18 @@ export default defineConfig(({ mode }) => {
output: {
entryFileNames: 'static/client.js',
chunkFileNames: 'static/assets/[name]-[hash].js',
assetFileNames: 'static/assets/[name].[ext]'
}
assetFileNames: 'static/assets/[name].[ext]',
},
},
emptyOutDir: false
}
emptyOutDir: false,
},
}
} else {
return {
ssr: {
external: ['react', 'react-dom']
external: ['react', 'react-dom'],
},
plugins: [honox(), pages()]
plugins: [honox(), build()],
}
}
})
Expand Down Expand Up @@ -711,7 +711,7 @@ Finally, add `vite.config.ts` configuration to output assets for the production.
```ts
import honox from 'honox/vite'
import { defineConfig } from 'vite'
import pages from '@hono/vite-cloudflare-pages'
import build from '@hono/vite-build/cloudflare-pages'

export default defineConfig({
plugins: [
Expand All @@ -720,7 +720,7 @@ export default defineConfig({
input: ['/app/style.css'],
},
}),
pages(),
build(),
],
})
```
Expand Down Expand Up @@ -837,10 +837,10 @@ Setup the `vite.config.ts`:
// vite.config.ts
import { defineConfig } from 'vite'
import honox from 'honox/vite'
import pages from '@hono/vite-cloudflare-pages'
import build from '@hono/vite-build/cloudflare-pages'

export default defineConfig({
plugins: [honox(), pages()],
plugins: [honox(), build()],
})
```
Expand Down Expand Up @@ -913,6 +913,21 @@ You can also deploy it to Cloudflare Pages.
wrangler pages deploy ./dist
```
### Others
Using `@hono/vite-build`, you can build the HonoX app for various platforms. For example, you can make it for the Bun:
```ts
// vite.config.ts
import { defineConfig } from 'vite'
import honox from 'honox/vite'
import build from '@hono/vite-build/bun'

export default defineConfig({
plugins: [honox(), build()],
})
```
## Examples
- https://github.com/yusukebe/honox-examples
Expand Down

0 comments on commit 45019e4

Please sign in to comment.