Angular 10 References/ CLI

WebWorker generator

ng generate webWorker <name> [--[option]=[value]]

Creates a new generic web worker definition in the given or default project.



The name of the project.
Type string


Add a worker creation snippet in a sibling file of the same name.
Type boolean
Default true


The target to apply web worker to.
Type string
Default build