Constructor

WorkboxWebpackPlugin

new WorkboxWebpackPlugin(config)

Creates an instance of WorkboxWebpackPlugin.

Parameter

config

Optional

module:workbox-build.Configuration

All the options as passed to module:workbox-build.generateSWString.

Values in config have the following properties:

Parameter

chunks

Optional

Array of String

Array of chunk names to use for generating the asset manifest. All assets belonging to the provided chunk names will be included in the asset manifest. Any chunks that are not listed or do not have a name will be removed.

excludeChunks

Optional

Array of String

Array of chunk names to exclude from the asset manifest. Any asset beloning to the provided chunk names will not be included in the asset manifest. This does not affect chunks with no chunk name.

filename

Optional

string

Name of the service worker file

manifestFilename

Optional

string

Name of the manifest file that will be written to the build directory

swSrc

Optional

string

Path to an existing service worker file. Will be added to the webpack compilation and prepended with importScripts('workbox-sw.js', 'file-manifest.js')