Interface: GenerateSwModeConfig

Extends

Properties

filename?

optional filename: string

Default Value

"sw.js"

Inherited from

SharedSwConfig.filename


include?

optional include: string[] | (assets) => string[]

This array will be passed to workbox globPatterns. By default all assets bundled by rsbuild are included plus sw registration script and web app manifest

Examples

["**/*.{js,wasm,css,html}"]
(assets) => [...assets.map(asset => asset), "**/*.{ico,svg,png}"]

Inherited from

SharedSwConfig.include


mode

mode: "generateSw"


workboxOptions?

optional workboxOptions: WorkboxGenerateSWOptions