Back to Serwist

exclude

docs-webpack-plugin-configuring-exclude.md

latest628 B
Original Source

exclude

First added

Workbox

About

One or more specifiers used to exclude assets from the precache manifest. This is interpreted following the same rules as webpack’s standard exclude option.

Default

[/\.map$/, /^manifest.*\.js$/]

Usage

webpack.config.js

new InjectManifest({
  exclude: [
    /\.map$/, 
    /^manifest.*\.js$/,
    ({ asset }) => asset.name.startsWith("server/"),
  ],
});

More resources

Here is a list of resources you can read to learn more about exclude: