Vite Quick Start
1. Install
bash
pnpm add -D mokupbash
npm install -D mokupbash
yarn add -D mokupbash
bun add -d mokup2. Enable the plugin
ts
import mokup from 'mokup/vite'
import { defineConfig } from 'vite'
export default defineConfig({
plugins: [
mokup({
entries: {
dir: 'mock',
prefix: '/api',
},
}),
],
})3. Start dev server
bash
pnpm devbash
npm run devbash
yarn devbash
bun run dev4. Verify
http://localhost:5173/api/usershttp://localhost:5173/__mokup
Next
See the full options in Vite Plugin.