Skip to content

Conversation

@alan-agius4
Copy link
Collaborator

When adding service worker support to a project, the schematic attempts to add the serviceWorker option to the production build configuration. If the production configuration is missing, the schematic would previously do nothing and not inform the user.

This change adds a warning message to the console when the production configuration is not found, making it clear to the user why the serviceWorker option was not added.

Fixes #32399

@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Jan 30, 2026
…ng for service worker

When adding service worker support to a project, the schematic attempts to add the `serviceWorker` option to the `production` build configuration. If the `production` configuration is missing, the schematic would previously do nothing and not inform the user.

This change adds a warning message to the console when the `production` configuration is not found, making it clear to the user why the `serviceWorker` option was not added.

Fixes angular#32399
@alan-agius4 alan-agius4 force-pushed the service-worker-config branch from 84c1c87 to 182d75d Compare January 30, 2026 14:12
@alan-agius4 alan-agius4 requested a review from clydin January 30, 2026 15:54
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jan 30, 2026
@alan-agius4 alan-agius4 merged commit 51fc778 into angular:main Jan 30, 2026
35 checks passed
@alan-agius4 alan-agius4 deleted the service-worker-config branch January 30, 2026 17:49
@alan-agius4
Copy link
Collaborator Author

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @schematics/angular target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(@angular/pwa): ng add @angular/pwa fails to update angular.json and register service worker

2 participants