Vite Plugin for API Mock Server

JSON →
library 2.1.1 ·javascript
verified May 27, 2026

vite-plugin-mock-dev-server is a Vite plugin designed to provide a lightweight, flexible, and fast API mock development server. It is currently stable at version 2.1.1 and receives frequent updates, including new features and bug fixes. Key differentiators include its non-intrusive, non-injection-based approach to mocking, full TypeScript support, Hot Module Replacement (HMR) for mock files, and pure ES Module architecture since version 2.0.0. The plugin automatically imports mock files from designated directories (default `mock` folder) and supports various content types for responses (text, JSON, buffer, stream). It integrates seamlessly with Vite's `server.proxy` configuration and allows the use of `viteConfig.define` and environment variables within mock definitions. Advanced features like WebSocket mocking, request recording/replay, error simulation, and the ability to build small, independent deployable mock services further enhance its utility for front-end development workflows.

total hits 15
actors 5 distinct systems
last hit 2d ago AhrefsBot
GPTBot
5
MetaBot
4
Script
1
Search engines
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France