@cpsoinos/vite-plugin-http2-proxy weekly downloads statistics
By cpsoinos · npm · Vite plugins
A Vite plugin that allows you to proxy requests to an HTTP2 server.
@cpsoinos/vite-plugin-http2-proxy has 9,026 recorded weekly downloads on npm, an increase of 3.4% over the past 30 days, ranking #1313 of 3,247 tracked listings.
About @cpsoinos/vite-plugin-http2-proxy
vite-plugin-http2-proxy
Run an HTTP2 proxy in development mode with Vite. Works great when paired with vite-plugin-mkcert.
Why would I use this?
When using Vite's built-in proxy and https: true, all requests are downgraded to HTTP1.1. See this issue for discussion. This plugin is useful when you need to proxy requests to an external API in development mode and you want to use https and/or HTTP2.
Use this with vite-plugin-mkcert for seamless SSL certificate generation and use of https with proxy usage in development.
Install
Using npm
npm install @cpsoinos/vite-plugin-http2-proxy --save-dev
Using yarn
yarn add @cpsoinos/vite-plugin-http2-proxy -D
Using pnpm
pnpm add @cpsoinos/vite-plugin-http2-proxy -D
Usage
// vite.config.ts
import { defineConfig } from 'vite'
import http2Proxy from '@cpsoinos/vite-plugin-http2-proxy'
import mkcert from 'vite-plugin-mkcert' // optional - use to generate SSL certificates and use https in development
export default defineConfig(({ mode }) => {
return {
plugins: [
// ... other plugins
mkcert(), // optional
http2Proxy({ quiet: true }), // optional -- suppress error logging
],
server: {
// optional - only in development mode
...(mode === 'development' && {
proxy: {
'/api': {
target: 'https://api.example.com',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''), // optional - remove `/api` from request path
},
},
}),
},
}
})
Accreditations
Adapted from a gist shared by @xfournet in this issue comment.
This plugin uses http2-proxy under the hood. See the http2-proxy package for more information.
Show your support
Give a ⭐️ if this project helped you!
📝 License
Copyright © 2024 Corey Psoinos.
This project is MIT licensed.
Description from the npm listing.
- vite
- vite-plugin
- http2
- http2-proxy
- proxy
- https-proxy
- vite-plugin-http2-proxy
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 (142)Similar npm Vite plugins plugins
All 20 @cpsoinos/vite-plugin-http2-proxy 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/@cpsoinos/vite-plugin-http2-proxy. First seen Nov 12, 2026; last successful collection Dec 6, 2026. See the methodology.