Mock Package (@vup/mock)
@vup/mock provides an MSW-based mock layer for development and integration.
What It Solves
- Enables frontend-first delivery before backend is ready
- Keeps request paths stable between mock and real API
- Makes edge-case and error-path testing easier
Typical Scenarios
- Parallel frontend/backend development
- Temporary simulation for unstable APIs
- Reproducible QA and demo environments
Recommended Usage
- Keep API function signatures unchanged
- Toggle mock by environment switch
- Remove ad-hoc inline fake data from business code