UNPKG

ruch

Version:

Revolutionary React TypeScript CLI with hexagonal architecture & AI-powered development assistance. Create maintainable, scalable applications with domain-driven design and integrated AI tooling.

22 lines (18 loc) 597 B
// MSW Browser Worker Configuration // This file sets up MSW for browser/development environment import { setupWorker } from 'msw/browser'; import { handlers } from './handlers/index'; // Setup worker with all domain handlers export const worker = setupWorker(...handlers); // Start worker for development export const startMsw = async () => { if (process.env.NODE_ENV === 'development') { await worker.start({ onUnhandledRequest: 'bypass', serviceWorker: { url: '/mockServiceWorker.js' } }); console.log('🔧 MSW: Mock Service Worker started'); } };