Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: @hono/vite-build #177

Merged
merged 14 commits into from
Sep 15, 2024
Merged

feat: @hono/vite-build #177

merged 14 commits into from
Sep 15, 2024

Conversation

yusukebe
Copy link
Member

@yusukebe yusukebe commented Sep 13, 2024

With this PR, introduce a new Vite plugin, @hono/vite-build.

This will replace the @hono/vite-cloudflare-pages and these are used for not only Cloudflare Pages. This is a set of Vite plugins that can build your Hono app to:

  • Bun
  • Node.js
  • Cloudflare Pages
  • Cloudflare Workers
  • Others

Your vite.config.ts will look like the following: You can change the target runtime by changing the importing modules.

import { defineConfig } from 'vite'

//import build from '@hono/vite-build/cloudflare-pages'
//import build from '@hono/vite-build/cloudflare-workers'
//import build from '@hono/vite-build/node'
import build from '@hono/vite-build/bun'

export default defineConfig({
  plugins: [
    build({
      entry: './src/index.ts'
    })
  ]
})

Copy link

changeset-bot bot commented Sep 13, 2024

🦋 Changeset detected

Latest commit: 12256e2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hono/vite-build Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@yusukebe yusukebe marked this pull request as ready for review September 14, 2024 10:11
@yusukebe yusukebe merged commit 1ceb957 into main Sep 15, 2024
5 checks passed
@yusukebe yusukebe deleted the feat/build branch September 15, 2024 01:07
@github-actions github-actions bot mentioned this pull request Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant