Skip to content
PluginStats

vite-plugin-mock-dev-server weekly downloads statistics

By pengzhanbo · npm · Vite plugins

Vite Plugin for API mock dev server.

View on npm Fresh · Dec 6, 2026

vite-plugin-mock-dev-server has 16,779 recorded weekly downloads on npm, a decrease of 4.0% over the past 30 days, ranking #1099 of 3,247 tracked listings.

Weekly downloads
16,779
Official API · Dec 5, 2026
7-day growth
-3.7%
-653 weekly downloads
30-day growth
-4.0%
-693 weekly downloads
90-day growth
+52.8%
+5.8K weekly downloads
Rank
#1099
▼ 33 in 7 days

About vite-plugin-mock-dev-server

vite-plugin-mock-dev-server

Vite Plugin for API mock dev server.

<p align="center"> <a href="https://www.npmjs.com/package/vite-plugin-mock-dev-server"><img alt="npm" src="https://img.shields.io/npm/v/vite-plugin-mock-dev-server?style=flat-square"></a> <img alt="node-current" src="https://img.shields.io/node/v/vite-plugin-mock-dev-server?style=flat-square"> <img alt="npm peer dependency version" src="https://img.shields.io/npm/dependency-version/vite-plugin-mock-dev-server/peer/vite?style=flat-square"> <img alt="npm" src="https://img.shields.io/npm/dm/vite-plugin-mock-dev-server?style=flat-square"> <br> <img alt="package esm only" src="https://img.shields.io/badge/package-ESM--only-ffe536.svg"> <img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/pengzhanbo/vite-plugin-mock-dev-server/release.yaml?style=flat-square"> <a href="https://app.fossa.com/projects/git%2Bgithub.com%2Fpengzhanbo%2Fvite-plugin-mock-dev-server?ref=badge_shield"><img alt="fossa status" src="https://app.fossa.com/api/projects/git%2Bgithub.com%2Fpengzhanbo%2Fvite-plugin-mock-dev-server.svg?type=shield"></a> </p>

Features

  • ⚡️ Lightweight, Flexible, Fast.
  • 🧲 Not injection-based, non-intrusive to client code.
  • 💡 ESModule/commonjs.
  • 🦾 Typescript.
  • 🔥 HMR
  • 🏷 Support .[cm]?js / .ts / .json / .json5.
  • 📦 Auto import mock file.
  • 🎨 Support any lib, like mockjs, or do not use it.
  • 📥 Path rule matching, request parameter matching.
  • ⚙️ Support Enabled/Disabled any one of the API mock.
  • 📀 Supports response body content type such as text/json/buffer/stream.
  • ⚖️ Use server.proxy
  • 🍕 Support viteConfig.define and env in the mock file.
  • ⚓️ Support viteConfig.resolve.alias in the mock file.
  • 🌈 Support vite preview mode.
  • 📤 Support multipart content-type, mock upload file.
  • 📥 Support mock download file.
  • ⚜️ Support WebSocket Mock
  • 🗂 Support building small independent deployable mock services.

Documentation

See the documentation for more details.

Netlify Status

Install

# npm
npm i -D vite-plugin-mock-dev-server
# yarn
yarn add vite-plugin-mock-dev-server
# pnpm
pnpm add -D vite-plugin-mock-dev-server

Usage

vite.config.ts

import { defineConfig } from 'vite'
import mockDevServerPlugin from 'vite-plugin-mock-dev-server'

export default defineConfig({
  plugins: [mockDevServerPlugin(/* plugin options */)],
  // The fields defined here can also be used in mock.
  define: {},
  server: {
    // plugin will read `server.proxy`
    proxy: {
      '^/api': { target: 'http://example.com' },
    },
  },
})

The plugin will read the configuration of server.proxy or options.prefix, and enable mock matching for matched URLs.

The plugin will also read the define configuration, which supports direct use in mock files.

Edit Mock File

By default, write mock data in the mock directory of your project's root directory:

mock/**/*.mock.ts :

import { defineMock } from 'vite-plugin-mock-dev-server'

export default defineMock({
  url: '/api/test',
  body: { a: 1, b: 2 },
})

Links

LICENSE

The plugin is licensed under the MIT License

FOSSA Status

Description from the npm listing.

  • development
  • mock
  • mock-server
  • plugin
  • 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

vite-plugin-mock-dev-server weekly downloads on npm, last 90 days: 16,779 weekly downloads as of Dec 5, 2026, +52.8% over 90 days.vite-plugin-mock-dev-serverWeekly downloads on npm · Last 90 days16,779downloads / week+52.8% over 90 days05K10K15K20KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
vite-plugin-mock-dev-server weekly downloads on npm, last 90 days: 16,779 weekly downloads as of Dec 5, 2026, +52.8% over 90 days.

7/30/90-day growth

vite-plugin-mock-dev-server weekly downloads growth on npm: -3.7% over 7 days, -4.0% over 30 days, +52.8% over 90 days.vite-plugin-mock-dev-serverWeekly downloads growth on npm16,779downloads / week now7-day growth-653 weekly downloads-3.7%30-day growth-693 weekly downloads-4.0%90-day growth+5,799 weekly downloads+52.8%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
vite-plugin-mock-dev-server weekly downloads growth on npm: -3.7% over 7 days, -4.0% over 30 days, +52.8% over 90 days.

Ranking history

vite-plugin-mock-dev-server npm ranking history: currently #1099 (by weekly downloads).vite-plugin-mock-dev-servernpm ranking · by weekly downloads · Last 90 days#1099current rank#980#1000#1020#1040#1060#1080#1100#1120Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
vite-plugin-mock-dev-server npm ranking history: currently #1099 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 55, #19 (overall #1,099)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins300 listings · 15 pages · page 10, #8 (overall #188)
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 vite-plugin-mock-dev-server
Date (UTC)Weekly downloadsChange vs. previous
16,779-153
16,932+601
16,331+562
15,769-444
16,213-459
16,672-389
17,061-371
17,432+94
17,338+108
17,230-722
17,952+168
17,784-415
18,199+204
17,995—

Similar npm Vite plugins plugins

All 20 vite-plugin-mock-dev-server 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/vite-plugin-mock-dev-server. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.