Interface: SharedSwConfig

Extended by

Properties

filename?

optional filename: string

Default Value

"sw.js"

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}"]

includeWebAppManifestIcons?

optional includeWebAppManifestIcons: boolean | number[]

should precache the icons defined in WebAppManifestConfig? it can be a boolean or an array of the icons' indexes that should be precached.

Examples

true
[0, 1]