Back to Rspack

WebWorkerTemplatePlugin

website/docs/en/plugins/webpack/web-worker-template-plugin.mdx

2.0.1361 B
Original Source

WebWorkerTemplatePlugin

This plugin is used to bundle Web Worker assets, often used with childCompiler.

It sets output.chunkLoading to 'import-scripts' and applies the 'array-push' chunk format used by web worker targets.

js
new rspack.webworker.WebWorkerTemplatePlugin();