import type { Plugin } from "vite"; export interface AspNetCoreHmrPluginOptions { /** The base path for vite when running with HMR. * Must correlate with `ViteServerOptions.PathBase` in aspnetcore. */ base?: string; /** If true (default), will inject https key and cert from `dotnet dev-certs` */ https?: boolean; /** If true (default), most relative imports will be rewritten to include the host * of the underlying Vite dev server, allowing these requests to bypass the * ASP.NET Core Server. This results in a significant performance boost when a debugger is attached to .NET. */ assetBypass?: boolean; /** If true (default), index.html will be written to the output path on disk as it updates. * This mirrors production behavior where index.html will be served from wwwroot. * However, during development, if the port of the HMR server ever changes, the copy on disk will briefly * contain the wrong port on app startup. */ writeIndexHtmlToDisk?: boolean; /** If set, will override the hostname that is injected into index.html * and other assets when `assetBypass` is true. Can be configured to access the * local development app instance from a network computer, e.g. a phone or * tablet for mobile testing. */ host?: string; /** If true (default), some code will be injected during development * that attempts to detect and suggest fixes for common browser configuration issues. */ offerConfigurationSuggestions?: boolean; /** If true (default), will invoke `npm ls` on start to validate that actual installed packages * match the versions defined in package.json. Only supports `npm`. */ checkPackageVersions?: boolean; } /** * A plugin that works with IntelliTect.Coalesce.Vue.ViteDevelopmentServerMiddleware: * - Writes `index.html` to the build output directory during HMR development, * allowing any transformations in HomeController.cs to work identically in both dev and prod. * - Shuts down the HMR server when the parent ASP.NET Core application shuts down, preventing process orphaning. * - Automatically obtains certs from `dotnet-devcerts` and injects them into the Vite configuration. */ export declare function createAspNetCoreHmrPlugin({ base, https, assetBypass, writeIndexHtmlToDisk, host: configuredHost, offerConfigurationSuggestions, checkPackageVersions, }?: AspNetCoreHmrPluginOptions): Plugin[] | undefined; /** Use the dotnet CLI's `dev-certs` tool to create certs to use for the vite server. * The vite server needs to run as HTTPS so that if the aspnetcore server is also HTTPS, * the browser isn't trying to connect to the HMR server's websocket endpoint as mixed content (which fails). */ export declare function getCertPaths(certName?: string): Promise<{ certFilePath: string; keyFilePath: string; certsExportPromise: Promise; } | { certFilePath: string; keyFilePath: string; certsExportPromise?: undefined; }>;