---
url: /api/symbols/workbox-window/esm-sw-detector/isserviceworkermodulesupported.md
---

# 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](https://caniuse.com/?search=service+worker) 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.
