Skip to content
PluginStats

@hono/vite-build weekly downloads statistics

By hono (2 listings) · npm · Vite plugins

Vite plugin to build your Hono app

View on npm Fresh · Dec 6, 2026

@hono/vite-build has 160,499 recorded weekly downloads on npm, an increase of 24.9% over the past 30 days, ranking #564 of 3,247 tracked listings.

Weekly downloads
160,499
Official API · Dec 5, 2026
7-day growth
-11.8%
-21.5K weekly downloads
30-day growth
+24.9%
+32K weekly downloads
90-day growth
+5.7%
+8.6K weekly downloads
Rank
#564
▼ 36 in 7 days

About @hono/vite-build

@hono/vite-build

@hono/vite-build is a set of Vite plugins for building Hono applications with Vite. It supports multiple runtimes and platforms, allowing you to build a project that includes JavaScript files for these platforms from a Hono app.

Here are the modules included:

  • @hono/vite-build/base
  • @hono/vite-build/cloudflare-pages
  • @hono/vite-build/cloudflare-workers
  • @hono/vite-build/bun
  • @hono/vite-build/node
  • @hono/vite-build/netlify-functions
  • @hono/vite-build/vercel

Usage

Install

You can install vite and @hono/vite-build via the npm.

npm i -D vite @hono/vite-build

Or you can install them with Bun.

bun add -D vite @hono/vite-build

The Bun adapter and the Netlify Functions adapter import from @hono/bun and @hono/netlify. Install the one for your adapter.

bun add @hono/bun
Settings

Add "type": "module" to your package.json. Then, create vite.config.ts and edit it. The following is for Bun.

import { defineConfig } from 'vite'
import build from '@hono/vite-build/bun'
// 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/netlify-functions'
// import build from '@hono/vite-build/vercel'

export default defineConfig({
  plugins: [
    build({
      // Defaults are `src/index.ts`,`./src/index.tsx`,`./app/server.ts`
      entry: './src/index.tsx',
      // port option is only for Node.js adapter. Default is 3000
      port: 3001,
    }),
  ],
})
Build

Just run vite build.

npm exec vite build

Or

bunx --bun vite build
Run

Run with the command on your runtime. For examples:

Cloudflare Pages:

wrangler pages dev ./dist

Bun:

cd ./dist
bun run ./index.js

Node.js:

cd ./dist
node ./index.js

Common Options

type BuildOptions = {
  entry?: string | string[]
  output?: string
  outputDir?: string
  external?: string[]
  minify?: boolean
  emptyOutDir?: boolean
  preset?: 'hono' | 'hono/tiny' | 'hono/quick' '@hono/hono'
}

Default values:

export const defaultOptions = {
  entry: ['src/index.ts', './src/index.tsx', './app/server.ts'],
  output: 'index.js',
  outputDir: './dist',
  external: [],
  minify: true,
  emptyOutDir: false,
  staticPaths: [],
  preset: 'hono',
}

Platform specific things

Cloudflare Pages

This plugin generates _routes.json automatically. The automatic generation can be overridden by creating a public/_routes.json. See Create a _routes.json file on Cloudflare Docs for more details.

Vercel

By default, the Vercel adapter emits a single function named __hono and a catch-all route.

To emit multiple functions, add the Vercel adapter multiple times in plugins.

import { defineConfig } from 'vite'
import build from '@hono/vite-build/vercel'

export default defineConfig({
  plugins: [
    build({
      entry: './src/server.ts',
      vercel: {
        name: 'api',
        routes: [{ src: '^/api(?:/.*)?$' }],
      },
    }),
    build({
      entry: './src/auth.ts',
      vercel: {
        name: 'auth',
        routes: [{ src: '^/auth(?:/.*)?$' }],
        function: {
          maxDuration: 30,
        },
      },
    }),
  ],
})

If vercel.routes is omitted, the adapter generates ^/<function-name>(?:/.*)?$. If vercel.name is omitted, the adapter uses __hono.

Example project

src/index.tsx:

import { Hono } from 'hono'

const app = new Hono()

app.get('/', (c) => {
  return c.html(
    <html>
      <head>
        <link href='/static/style.css' rel='stylesheet' />
      </head>
      <body>
        <h1>Hello!</h1>
      </body>
    </html>
  )
})

export default app

public/static/style.css:

h1 {
  font-family: Arial, Helvetica, sans-serif;
}

The project with those file will be built to the following files with @hono/vite-build/bun:

dist
├── index.js
└── static
 └── style.css

Build a client

If you also want to build a client-side script, you can configure it as follows.

export default defineConfig(({ mode }) => {
  if (mode === 'client') {
    return {
      build: {
        rollupOptions: {
          input: './src/client.ts',
          output: {
            dir: './dist/static',
            entryFileNames: 'client.js',
          },
        },
        copyPublicDir: false,
      },
    }
  } else {
    return {
      plugins: [build()],
    }
  }
})

The build command:

vite build --mode client && vite build

import.meta.env.PROD is helpful in detecting whether it is in development or production mode if you are using it on a Vite dev server.

app.get('/', (c) => {
  return c.html(
    <html>
      <head>
        {import.meta.env.PROD ? (
          <script type='module' src='/static/client.js'></script>
        ) : (
          <script type='module' src='/src/client.ts'></script>
        )}
      </head>
      <body>Hello!</body>
    </html>
  )
})

Example

You can see the example project here - hono-vite-jsx

Authors

License

MIT

Description from the npm listing.

  • hono
  • vite-plugin

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@hono/vite-build weekly downloads on npm, last 90 days: 160,499 weekly downloads as of Dec 5, 2026, +5.7% over 90 days.@hono/vite-buildWeekly downloads on npm · Last 90 days160,499downloads / week+5.7% over 90 days050K100K150K200KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@hono/vite-build weekly downloads on npm, last 90 days: 160,499 weekly downloads as of Dec 5, 2026, +5.7% over 90 days.

7/30/90-day growth

@hono/vite-build weekly downloads growth on npm: -11.8% over 7 days, +24.9% over 30 days, +5.7% over 90 days.@hono/vite-buildWeekly downloads growth on npm160,499downloads / week now7-day growth-21,512 weekly downloads-11.8%30-day growth+31,979 weekly downloads+24.9%90-day growth+8,587 weekly downloads+5.7%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@hono/vite-build weekly downloads growth on npm: -11.8% over 7 days, +24.9% over 30 days, +5.7% over 90 days.

Ranking history

@hono/vite-build npm ranking history: currently #564 (by weekly downloads).@hono/vite-buildnpm ranking · by weekly downloads · Last 90 days#564current rank#500#520#540#560#580#600Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
@hono/vite-build npm ranking history: currently #564 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 29, #4 (overall #564)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins300 listings · 15 pages · page 5, #5 (overall #85)
Vite plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (170)
Recent weekly downloads observations for @hono/vite-build
Date (UTC)Weekly downloadsChange vs. previous
160,499-2.3K
162,749-2K
164,699-5.6K
170,301+3.3K
167,010+1.1K
165,899-7.2K
173,077-8.9K
182,011-7.4K
189,397-1K
190,445-5.3K
195,768+4.3K
191,476+6.5K
184,955+7.9K
177,022—

Similar npm Vite plugins plugins

All 20 @hono/vite-build alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/@hono/vite-build. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.