@hono/vite-dev-server weekly downloads statistics
By hono (2 listings) · npm · Vite plugins
Vite dev-server plugin for Hono
@hono/vite-dev-server has 98,455 recorded weekly downloads on npm, a decrease of 48.2% over the past 30 days, ranking #456 of 2,256 tracked listings.
About @hono/vite-dev-server
@hono/vite-dev-server
@hono/vite-dev-server is a Vite Plugin that provides a custom dev-server for fetch-based web applications like those using Hono. You can develop your application with Vite. It's fast.
Features
• Support any fetch-based applications. • Hono applications run on. • Fast by Vite. • HMR (Only for the client side). • Adapters are available, e.g., Cloudflare. • Also runs on Bun.
Demo
https://github.com/honojs/vite-plugins/assets/10682/a93ee4c5-2e1a-4b17-8bb2-64f955f2f0b0
Supported applications
You can run any application on @hono/vite-dev-server that uses fetch and is built with Web Standard APIs. The minimal application is the following.
This code can also run on Cloudflare Workers or Bun. And if you change the entry point, you can run on Deno, Vercel, Lagon, and other platforms.
Hono is designed for fetch-based applications like this.
So, any Hono application will run on @hono/vite-dev-server.
Usage
Installation
You can install vite and @hono/vite-dev-server via npm.
Or you can install them with Bun.
Settings
Add "type": "module" to your package.json. Then, create vite.config.ts and edit it.
Development
Just run vite.
Or
Options
The options are below.
Default values:
injectClientScript
If it's true and the response content type is "HTML", inject the script that enables Hot-reload. default is true.
exclude
The paths that are not served by the dev-server.
If you have static files in public/assets/* and want to return them, exclude /assets/* as follows:
ignoreWatching
You can add target directories for the server to watch.
adapter
You can pass the env value of a specified environment to the application.
base
The base option specifies the base path under which your application is served. It provides behavior equivalent to Hono's .basePath(), but does not depend on Hono itself. Note that c.req will contain paths without the base you specify here.
Provide an empty string or / to serve from the root, or a leading-slash path such as /foo/bar.
When this option is set, the Vite base configuration will be overridden by the vite-dev-server.
For example, if you set base to /foo/bar, when a browser requests /foo/bar/path the vite-dev-server will handle that request and pass /path to your application.
Adapter
Cloudflare
You can pass the Bindings specified in wrangler.toml to your application by using "Cloudflare Adapter".
Install miniflare and wrangler to develop and deploy your cf project.
Node.js & Bun
No additional dependencies needed.
Helper
ConnInfo
You can use the ConnInfo helper to get connection information. For more details: ConnInfo Helper.
You can use it like this:
You can also use different ConnInfo Helpers in development and production environments as shown below:
Tips
You can get vite dev server's instance from request context.
Client-side
You can write client-side scripts and import them into your application using Vite's features. If /src/client.ts is the entry point, simply write it in the script tag. Additionally, import.meta.env.PROD is useful for detecting whether it's running on a dev server or in the build phase.
In order to build the script properly, you can use the example config file vite.config.ts as shown below.
You can run the following command to build the client script.
Frequently Asked Questions
exports is not defined
If you use a package that only supports CommonJS, you will encounter the error exports is not defined.
In that case, specify the target package in ssr.external in vite.config.ts:
Importing Asset as URL is not working
If you want to import assets as URL with the following code, the logo image may not be found.
This is because logo.png is served from this dev-server, even though it is expected to be served from Vite itself. So to fix it, you can add *.png to the exclude option:
Authors
• Yusuke Wada
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
7/30/90-day growth
Ranking history
Listing placement
Listing placement
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 (121)Similar npm Vite plugins plugins
All 20 @hono/vite-dev-server alternativesData 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-dev-server. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.