Skip to content

There is no way to customize the service worker #63198

Closed as not planned
Closed as not planned

Description

@olfek

Activity

  1. olfek commented on Aug 16, 2025

    @olfek
    Author

    @alxhub - or maybe I'm missing something?

  2. JeanMeche commented on Aug 17, 2025

    @JeanMeche
    Member

    Hi,
    The feature request is a bit vague.
    With provideServiceWorker you can provide your own impelementation of the service worker.
    Also via the ngsw-config.json you can configure the file that provided automatically with the CLI integration.

    What use case are you looking to address ?

  3. added
    needs: clarificationThis issue needs additional clarification from the reporter before the team can investigate.
    area: service-workerIssues related to the @angular/service-worker package
    on Aug 17, 2025
  4. added this to the needsTriage milestone on Aug 17, 2025
  5. olfek commented on Aug 17, 2025

    @olfek
    Author

    You can provide your own service worker, but it must be a JavaScript file, which means you have to either write the service worker in JavaScript or setup another separate build pipeline to generate it, and there is no way to extend or pick and choose functionality from the Angular service worker.

  6. montella1507 commented on Aug 19, 2025

    @montella1507

    @JeanMeche not sure if it is related but as far as i know...

    Angular NGSW-worker has not been working correctly with angular "native" I18N (one folder per lang) for years... and every solution i have found is to modify NGSW worker?

    There have been some problems with i18N / pwa and redirects.

  7. olfek commented on Aug 19, 2025

    @olfek
    Author

    Quick update, since writing this, I am now:

    • Running a parallel build pipeline to generate the JavaScript service worker, so I can write the service worker in TypeScript.
    • Using the Google Chrome team's modular service worker library workbox.
  8. anisabboud commented on Aug 21, 2025

    @anisabboud

    https://angular.dev/ecosystem/service-workers/config

    The ngsw-config.json JSON configuration file specifies which files and data URLs the Angular service worker should cache and how it should update the cached files and data.

  9. JeanMeche commented on Aug 27, 2025

    @JeanMeche
    Member

    Per #63364, we won't be addressing this issue.

    The message is also visible here: https://angular.dev/ecosystem/service-workers

  10. angular-automatic-lock-bot commented on Sep 27, 2025

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  11. locked and limited conversation to collaborators on Sep 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: service-workerIssues related to the @angular/service-worker packageneeds: clarificationThis issue needs additional clarification from the reporter before the team can investigate.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions