Skip to content

SWTarget ​

Type Alias workbox-build

Service worker build targets:

  • when building the classic service worker, the default target will be ['chrome56', 'safari11', 'firefox60'].
  • when building the module service worker, the default target will be baseline-widely-available.

When using legacy Vite (Vite < 8) or using Rolldown, baseline-widely-available will be transformed to esnext (no transformation: check Rolldown target).

You can specify custom targets per service worker build.

ts
type SWTarget = SWTargets | { classic: SWTargets; module: SWTargets }

Released under the MIT License.