import type { Plugin } from 'vite'; /** The hooks a lazy plugin can forward. Vite awaits every one of them. */ declare const FORWARDED_HOOKS: readonly ['config', 'configResolved', 'configureServer', 'resolveId', 'load', 'transform', 'transformIndexHtml', 'watchChange']; type ForwardedHook = (typeof FORWARDED_HOOKS)[number]; type Order = 'pre' | 'post'; /** * What Vite needs to know about a plugin before its code is loaded: the * fields it reads while sorting and filtering plugins, and which hooks exist * (an `order` changes where a hook runs, so it can't be filled in later). */ export interface LazyPluginShape { name: string; enforce?: Order; /** Every hook the real plugin defines, with its `order` if it sets one. */ hooks: Partial>; /** The real plugin's `devtools.capabilities`, when it has a devtools hook. */ devtools?: { capabilities: unknown; }; } /** * A serve-only plugin whose code is imported only when the dev server starts. * Vite drops `apply: 'serve'` plugins before it calls any hook of a build, so * under `vite build` `load` never runs and the real plugin, with everything it * imports, never enters the build process. * * The shell loads the real plugin in `config`, the first hook Vite calls, and * forwards each declared hook to it. A hook called before `config` (unit * tests do) loads it first. */ export declare const lazyServePlugin: (shape: LazyPluginShape, load: () => Promise) => Plugin; export {}; //# sourceMappingURL=lazy.d.ts.map