-
Notifications
You must be signed in to change notification settings - Fork 26.6k
Closed as not planned
Closed as not planned
Copy link
Labels
area: service-workerIssues related to the @angular/service-worker packageIssues related to the @angular/service-worker packagecross-cutting: standaloneIssues related to the NgModule-less worldIssues related to the NgModule-less worldworkaround2: non-obvious
Milestone
Description
Which @angular/* package(s) are the source of the bug?
service-worker
Is this a regression?
Yes
Description
Hi, I've made a little repo to illustrate the issue.
When using the old NgModule based syntax to init your app with a service worker, then your provided SwRegistrationOptions
is found and respected.
Runing the app gives you a console log.
When using standalone app syntax, via bootstrapApplication
then your provided SwRegistrationOptions
is not not found nor respected. Runing the app does not give you a console log.
Likely it was overlooked in the PR where the provideServiceWorker function was added. Or perhaps I'm just misunderstanding how it's supposed to work now.
Please provide a link to a minimal reproduction of the bug
https://github.com/antur84/sw-registration-options-bug/commits/main/
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run ng version
)
Angular CLI: 18.2.4
Node: 20.16.0
Package Manager: npm 10.8.1
OS: win32 x64
Angular: 18.2.4
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
... service-worker
Anything else?
No response
Metadata
Metadata
Assignees
Labels
area: service-workerIssues related to the @angular/service-worker packageIssues related to the @angular/service-worker packagecross-cutting: standaloneIssues related to the NgModule-less worldIssues related to the NgModule-less worldworkaround2: non-obvious