🔥 NG generate web worker breaks unit tests in Angular 12 #21108
Labels
area: @angular-devkit/build-angular
devkit/build-angular:karma
freq1: low
Only reported by a handful of users who observe it rarely
severity5: regression
type: bug/fix
Milestone
🐞 Bug Report
Affected Package
The issue involves the generator for service workers when using Angular 12.
Is this a regression?
The issue was not present in previous versions of Angular. It only started happening for Angular 12.
Description
When adding a web worker in Angular12 (now required to use the
import.meta.url
due to webpack 5 - as the Angular docs describe), unit tests will not run:Minimal Reproduction
npx -p @angular/cli ng new worker-test --style=scss --routing
cd new worker-test
npm run ng -- generate web-worker my-test-worker
npm run test
Exception or Error
Your Environment
Angular Version:
The text was updated successfully, but these errors were encountered: