Skip to content

isServiceWorkerModuleSupported ​

Function @vite-pwa/workbox-window/esm-sw-detector
ts
isServiceWorkerModuleSupported(userAgent: string): boolean

Detects if the current browser supports ESM service workers.

Based on caniuse baseline specifications.

Parameters ​

  • userAgent – The user agent string to check. If not provided, it will use the current browser's user agent.

Returns: true if the browser supports ESM service workers, false otherwise.

Released under the MIT License.