{"repo":"pengzhanbo/vite-plugin-mock-dev-server","free":true,"listed":false,"github":"https://github.com/pengzhanbo/vite-plugin-mock-dev-server","clone":"git clone https://github.com/pengzhanbo/vite-plugin-mock-dev-server.git","description":"🚀mock-dev-server is injected into the vite development environment to simulate requests and data responses.在vite 开发环境中注入 mock-dev-server, 模拟请求和数据响应","language":"TypeScript","stars":256,"topics":["mock","mock-server","vite","vite-plugin","vitejs","mockjs","typescript","fakerjs","graphql","websocket"],"license":"MIT","category":"networking-infra","readme_excerpt":"vite-plugin-mock-dev-server Vite Plugin for API mock dev server. English 简体中文 Features - ⚡️ Lightweight, Flexible, Fast. - 🧲 Not injection-based, non-intrusive to client code. - 💡 Pure ESModule. - 🦾 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 and Server-Sent Events Mock - 📝 Support recording and replay requests - 🗂 Support building small independent deployable mock services. Documentation See the documentation for more details. [!IMPORTANT] The plugin no longer supports CommonJS imports. Please use ESModule to import the plugin. --- [!IMPORTANT] The current document is for the v2 version of the plugin. If you are using the v1 version, please refer to the Migration Guide. Install Usage vite.config.ts 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. Edi","default_branch":null,"files":null,"tree":[],"storefront":"/r/pengzhanbo","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/pengzhanbo/vite-plugin-mock-dev-server/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}