export type TinyWebWorkerConfig = { /** * - The source file path for the Web Worker (e.g., 'src/workers/myWorker.mjs'). */ entry: string; /** * - The output filename for the Web Worker (e.g., 'myWorker.js'). */ filename: string; }; export type TinyVitePwaOptions = { /** * - The Web App Manifest object. */ manifest: Record; /** * - The URL path where the manifest should be served. */ manifestPath: string; /** * - The source directory containing the Service Worker. */ srcDir: string; /** * - The name of the Service Worker file. */ filename: string; /** * - Optional. Whether to automatically inject the SW registration script into the HTML . */ injectRegister?: boolean; /** * - Optional. Whether to inject the manifest into the global scope via Vite's `define`. */ injectManifestToGlobal?: boolean; /** * - Optional. Registration options for the Service Worker. */ swRegistrationOptions?: RegistrationOptions; /** * - Optional. A list of Web Workers to be bundled and served alongside the PWA. */ webWorkers?: TinyWebWorkerConfig[]; }; /** * Custom PWA Plugin. * Resolves Manifest, Dev HMR, Service Worker, and multiple Web Workers bundling. * * NOTE: The Service Worker and Web Worker files are always served from the root directory of the website. * * TypeScript Support: To enable IntelliSense and avoid type errors when using * the injected '__TINY_PWA_MANIFEST__' global variable, add the following to your `env.d.ts` file: * * ```typescript * declare global { * interface Window { * __TINY_PWA_MANIFEST__: Record; * } * } * ``` * * @param {TinyVitePwaOptions} options - The configuration options for the plugin. * @returns {import('vite').Plugin} The Vite plugin object. */ declare const TinyVitePwaPlugin: (options: TinyVitePwaOptions) => import('vite').Plugin; export default TinyVitePwaPlugin; //# sourceMappingURL=TinyVitePwaPlugin.d.mts.map