import * as _remix_run_dev from '@remix-run/dev'; import * as vite from 'vite'; import { VitePWAOptions } from 'vite-plugin-pwa'; interface RemixPWAInjectManifest { /** * Remove old assets once the new service worker activated? * * @default true */ cleanupOutdatedCaches?: boolean; /** * This option is about the Automatic reload when a new service worker is activated. * * If you use any Vite PWA virtual module, you **MUST** to set this option to `true`. * * With `auto`, the page will be reloaded without using a Vite PWA virtual module. * * **NOTE**: this option will be ignored if `registerType` is `autoUpdate` in your PWA options: the default value is `prompt`. * * @default 'auto' * @see https://vite-pwa-org.netlify.app/guide/auto-update.html */ clientsClaimMode?: 'auto' | boolean; } interface RemixPWASWOptions { /** * Options when using `@vite-pwa/remix/sw` module in your custom service worker */ injectManifest?: RemixPWAInjectManifest; } interface RemixPWAOptions extends Partial { remix?: RemixPWASWOptions; } declare function RemixVitePWA(): { RemixVitePWAPlugin: (config?: RemixPWAOptions) => vite.PluginOption; RemixPWAPreset: () => { name: string; remixConfig(): { buildEnd(): Promise; }; remixConfigResolved({ remixConfig }: { remixConfig: Readonly & { basename: string; buildDirectory: string; buildEnd?: ((args: { buildManifest: _remix_run_dev.BuildManifest | undefined; remixConfig: Readonly & any>; viteConfig: Readonly & { configFile: string | undefined; configFileDependencies: string[]; inlineConfig: vite.InlineConfig; root: string; base: string; publicDir: string; cacheDir: string; command: "build" | "serve"; mode: string; isWorker: boolean; isProduction: boolean; envDir: string; env: Record; resolve: Required & { alias: vite.Alias[]; }; plugins: readonly vite.Plugin[]; css: vite.ResolvedCSSOptions; esbuild: false | vite.ESBuildOptions; server: vite.ResolvedServerOptions; build: vite.ResolvedBuildOptions; preview: vite.ResolvedPreviewOptions; ssr: vite.ResolvedSSROptions; assetsInclude: (file: string) => boolean; logger: vite.Logger; createResolver: (options?: Partial | undefined) => vite.ResolveFn; optimizeDeps: vite.DepOptimizationOptions; worker: vite.ResolvedWorkerOptions; appType: vite.AppType; experimental: vite.ExperimentalOptions; } & vite.PluginHookUtils>; }) => void | Promise) | undefined; manifest: boolean; publicPath: string; serverBuildFile: string; serverBundles?: _remix_run_dev.ServerBundlesFunction | undefined; ssr: boolean; }>; }): void; }; }; export { type RemixPWAInjectManifest, type RemixPWAOptions, type RemixPWASWOptions, RemixVitePWA };