English
RegisterSWData
Interface unplugin-pwa-coreProperties
| Property | Type | Default | Description |
|---|---|---|---|
inline | boolean | When this flag is true the service worker must be registered via inline script otherwise registered via script with src attribute registerSW.js. | |
inlinePath | string | The path for the inline script: will contain the service worker url. | |
mode | "inline" | "script" | "script-defer" | When this flag is inline the service worker must be registered via inline script otherwise registered via script with src attribute registerSW.js. | |
registerPath | string | The path for the src script for registerSW.js. | |
scope | string | The scope for the service worker: only required for inline: true. | |
shouldRegisterSW | boolean | ||
toScriptTag | () => string | undefined | Returns the corresponding script tag if shouldRegisterSW returns true. | |
type | WorkerType | The type for the service worker: only required for inline: true. |