@mangadex-pub/vite-pwa-nuxt
Version:
Zero-config PWA for Nuxt 3
39 lines (35 loc) • 1.19 kB
TypeScript
import * as _nuxt_schema from '@nuxt/schema';
import { VitePWAOptions } from 'vite-plugin-pwa';
interface ClientOptions {
/**
* Exposes the plugin: defaults to true.
*/
registerPlugin?: boolean;
/**
* Registers a periodic sync for updates interval: value in seconds.
*/
periodicSyncForUpdates?: number;
/**
* Will prevent showing native PWA install prompt: defaults to false.
*
* When set to true or no empty string, the native PWA install prompt will be prevented.
*
* When set to a string, it will be used as the key in `localStorage` to prevent show the PWA install prompt widget.
*
* When set to true, the key used will be `vite-pwa:hide-install`.
*/
installPrompt?: boolean | string;
}
interface ModuleOptions extends Partial<VitePWAOptions> {
registerWebManifestInRouteRules?: boolean;
/**
* Writes the plugin to disk: defaults to false (debug).
*/
writePlugin?: boolean;
/**
* Options for plugin.
*/
client?: ClientOptions;
}
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
export { ClientOptions, ModuleOptions, _default as default };