import { BasePluginOptions } from "@distilled.cloud/cloudflare-rolldown-plugin/options"; import * as vite from "vite"; import { BindingHooks, RuntimeServices, RuntimeWorker } from "@distilled.cloud/cloudflare-runtime"; import * as Context from "effect/Context"; //#region src/plugin.d.ts interface CloudflareVitePluginDevOptions { /** * Where the Worker request-proxy middleware registers relative to the * `configureServer` post middlewares of other plugins. * * - `"post"` (default): append in plugin order. Required by frameworks whose * own dev middlewares must see requests first (e.g. Astro's prerender * handler and dev handler). * - `"pre"`: insert directly after Vite's internal middlewares, ahead of the * post middlewares other plugins registered. Use this when appending the * Cloudflare plugin after a framework's config-file plugins and the * framework registers its own Node request-bridge middleware that cannot * handle the Worker environment (e.g. Waku's RSC bridge, which assumes a * runnable Node environment). * * @default "post" */ middlewareOrder?: "pre" | "post"; } interface CloudflareVitePluginOptions extends BasePluginOptions { worker?: Omit, "compatibilityDate" | "compatibilityFlags" | "modules">; context?: Context.Context; dev?: CloudflareVitePluginDevOptions; } declare function cloudflareVitePlugin(options?: CloudflareVitePluginOptions): vite.PluginOption; //#endregion export { CloudflareVitePluginDevOptions, CloudflareVitePluginOptions, cloudflareVitePlugin as default }; //# sourceMappingURL=plugin.d.mts.map