@pitlane/vite-plugin-fetch-server weekly downloads statistics
By pitlane (3 listings) · npm · Vite plugins
Vite development server bridge that sends requests to an app's Fetch handler.
@pitlane/vite-plugin-fetch-server has 19,103 recorded weekly downloads on npm, ranking #1003 of 2,687 tracked listings.
About @pitlane/vite-plugin-fetch-server
@pitlane/vite-plugin-fetch-server
Serve vite dev requests through the Fetch handler your server module exports.
fetchServer({ entry }) sends every request Vite does not answer itself to the fetch method of entry's default export. The module is loaded through Vite's module runner on each request, so it is transformed like the rest of your app and an edit takes effect on the next request without a restart. It works with any framework, or none: all it needs is a module exporting { fetch }.
// src/http.ts
export default {
async fetch(request: Request): Promise<Response> {
return new Response(`You asked for ${new URL(request.url).pathname}`);
},
};
// vite.config.ts
import { fetchServer } from "@pitlane/vite-plugin-fetch-server";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [fetchServer({ entry: "src/http.ts" })],
});
Install
npm install --save-dev @pitlane/vite-plugin-fetch-server
# or
vp add -D @pitlane/vite-plugin-fetch-server
Requires vite@>=8.1.0 as a peer.
fetchServer(options)
| Option | Default | Meaning |
|---|---|---|
entry | none, required | Path to the server module. Never inferred from build inputs. |
environment | "ssr" | The Vite environment that loads entry. It must be runnable, running its modules inside the dev server process. |
- Development only. The plugin does nothing during
vite buildorvite previewand opens no port of its own. - A fallback. Files in
public/, modules the browser requests, and other plugins' middleware come first. The plugin setsappType: "custom"unless your config sets one. - Requests and responses as sent. The URL, including the Vite
base, plus the method, headers, body, status, repeated headers, and streamed bodies pass through unchanged. A client disconnect abortsrequest.signaland cancels a streaming body. Forwarded headers are not trusted. - Errors go to Vite. A throwing handler, a module that fails to load, or a default export without
fetchproduces Vite's development error page and anInternal server error:log line. - Configuration errors stop startup. A missing or empty
entry, an environment that does not exist, and a non-runnable environment, such as Cloudflare's, each fail with a message. Leave the plugin out where a runtime integration serves requests itself.
With @pitlane/assets
// vite.config.ts
import { assets } from "@pitlane/assets/vite-plugin";
import { fetchServer } from "@pitlane/vite-plugin-fetch-server";
import { defineConfig } from "vite";
export default defineConfig({
environments: {
client: { build: { outDir: "dist/client" } },
ssr: {
build: {
outDir: "dist/server",
rolldownOptions: { input: "src/http.ts" },
},
},
},
plugins: [assets(), fetchServer({ entry: "src/http.ts" })],
});
The Fetch server guide covers the full behavior.
Description from the npm listing.
- fetch
- pitlane
- ssr
- vite
- 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 (1)Similar npm Vite plugins plugins
All 20 @pitlane/vite-plugin-fetch-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/@pitlane/vite-plugin-fetch-server. First seen Oct 30, 2026; last successful collection Oct 30, 2026. See the methodology.