---
url: >-
  /api/symbols/unplugin-pwa-core/dev/prepare-sw-names-and-glob-directory/prepareswnamesandglobdirectory.md
---

# prepareSwNamesAndGlobDirectory

Function @unplugin-pwa/core/dev/prepare-sw-names-and-glob-directory

```ts
prepareSwNamesAndGlobDirectory(ctx: PWAPluginContext<B, UserStrategy, T>): Promise<void>
```

Prepare the service worker names, the glob directory and the temp folder.

**NOTE**: if the PWA plugin context has `swNames.hasNames` set to `true` at the dev options, this function will return immediately.

### Parameters

* `ctx` – The PWA Vite plugin context.
