import { type PluginOption } from 'vite'; import type { MiniContract } from '../mini-contract.ts'; import type { MiniStylePlugin } from '../styles/plugins.ts'; /** Selects the sole Vite environment that owns the physical Mini Program development project. */ export declare function isMiniClientEnvironment(environment: Readonly<{ name: string; }>): boolean; /** * Adds the serve-only bundled-development plugin set for a Mini Program target: the shared dev adapter, selected HMR mode, and React * Refresh adaptation transforms. * * The shared style pipeline already owns the resolver's ordered App/Page cascade policy, so the host does not reconstruct it * from unrelated Rolldown shell and bootstrap entries. */ export declare function createMiniDevelopmentPlugin(contract: MiniContract, styles: MiniStylePlugin): PluginOption[]; /** * Transfers development ownership of the App stylesheet from complete output to the dev host. * * The ordinary output hook emits the static production wrapper during every complete build. In development, the existing * physical wrapper instead contains the previous complete-build marker. If the static asset remained in this bundle, the * DevEngine would: * * 1. replace the versioned wrapper with static production bytes while JavaScript and HMR metadata are still being finalized; * 2. let the native tool observe that root-style change and reload the App against the previous patch identity, or before a * rebuild-mode transaction has completed; * 3. let the host replace the wrapper again with the new marker, causing a second App reload. * * Deleting the in-memory bundle entry avoids both premature writes. Startup cleanup retains DevTools project configuration * but removes the prior physical App stylesheet; recovery builds do not clean. The host publishes the stylesheet once afterward. * Patch modes first reset delivery and publish matching `hmr/info.js`; rebuild mode has no patch state and writes a fresh marker * directly. Incremental HMR never enters this complete-output hook and changes only the imported global stylesheet; rewriting * the App root would reload the runtime while a JavaScript patch is awaiting acknowledgement. The serve-only plugin leaves * production output unchanged. */ export declare function removeDevelopmentAppStyle(bundle: Record, appStyleFileName: string): void;