UNPKG

histoire

Version:

A fast story book powered by Vite

13 lines • 689 B
import type { Connect, ViteDevServer } from 'vite'; /** * Serves the project's MSW service worker in dev, like `histoire build` copies * it next to the build. Without it, `setupWorker().start()` in a story gets the * app HTML from the history fallback. * * Only the project's own msw is used (dev mocks modules without MSW), and a * copy in its `publicDir` (written by `msw init`) is left to Vite. * @param server The Vite dev server the middleware is registered on. * @param root The project root to resolve `msw` from. */ export declare function createMswWorkerMiddleware(server: ViteDevServer, root: string): Connect.NextHandleFunction; //# sourceMappingURL=msw-worker.d.ts.map