UNPKG

histoire

Version:

A fast story book powered by Vite

16 lines • 818 B
import type { Plugin as VitePlugin } from 'vite'; import type { Context } from '../context.js'; /** Data/UI and mock transport bootstrap stay native; story/support modules keep mocking. */ export declare function shouldTransformHistoireDynamicImport(id: string): boolean; /** * Builds the Vitest mocking plugins (`vi.mock`, automock, dynamic import * rewriting) from the project's own `@vitest/mocker`. * * Older Vitest versions or strict install layouts may not expose * `@vitest/mocker`: the run degrades to "no mocking support" with a warning * instead of crashing dev/build startup. * @param ctx The histoire context. * @returns The plugins to add, empty when mocking is unavailable. */ export declare function createMockerPlugins(ctx: Context): Promise<VitePlugin[]>; //# sourceMappingURL=mocker.d.ts.map