---
url: /api/symbols/workbox-build/build/rspack/rspackworkboxpwaplugin.md
---

# RspackWorkboxPWAPlugin

Class @vite-pwa/workbox-build/build/rspack

[rspack plugin](https://rspack.rs/plugins/) for Workbox build strategies.
**WARNING**: strategy from the resolved options will override the strategy used in the plugin constructor.

TODO: review this, should be reversed — a strategy provided at the plugin constructor
must override the default strategy from the resolved options
(`strategy ?? buildContext.strategy` in `builder/internal-webpack-build.ts`).

## Constructor

```ts
new RspackWorkboxPWAPlugin(strategy: S, options: Partial<WorkboxBuildConfiguration<S, T>>)
```

## Properties

## Methods

### apply()

```ts
apply(compiler: Compiler): void
```

Rspack plugin interface.
Hooks into 'afterEmit' to guarantee that Rspack has finished writing
the host application files to disk before we run our Rolldown compiler.
