import { type Manifest } from "./manifest.js"; /** Options for {@link discoverRoutes}. */ export interface DiscoverRoutesOptions { /** Appended (as `?`) to each route's dynamic import - the dev server sets a * changing value to bust Bun's module cache so SSR picks up edited route files. Ignored when * {@link load} is supplied, which does its own cache handling. */ readonly importQuery?: string; /** * Load a route module by its absolute path, instead of a bare dynamic `import()`. * * This is what lets a pipeline own SSR resolution. A bare `import()` always resolves through the * RUNTIME - Bun - so the Vite dev server ended up serving the client while Bun resolved the server, * two resolvers disagreeing about one specifier in a single process. That is the dual-React bug and * the reason `resolve.dedupe` never reached SSR: the alias governs Vite, and SSR never asked Vite. * * Pass `vite.ssrLoadModule` here and the Vite pipeline resolves both halves. Omit it and Bun does, * which is correct for the Bun pipeline. Either way one toolchain owns the phase. */ readonly load?: (absolutePath: string) => Promise; } /** Scan a `routes/` directory (recursively) and build the route manifest. */ export declare function discoverRoutes(dir: string, options?: DiscoverRoutesOptions): Manifest; //# sourceMappingURL=fs.d.ts.map