ionic-team / ionic-team/ionic-cli

Removing service worker for Cordova builds

Open
#3,800 2 comments 6 reactions 0 assignees View on GitHub
triage
Dominant language
TypeScript
Stars
2k
Forks
682
PR merge metrics
No merged PRs in 30d

Description

For a project that builds both Cordova native apps and PWAs via `ng add @angular/pwa` would be nice if the CLI removed the service worker when doing a Cordova build. Currently have to set the *serviceWorker* field in `angular.json` to false and remove the *ServiceWorkerModule* register in `app.module.ts` otherwise the Cordova build will try to register a service work and output an error (which it should). But would be nice if the CLI was able to handle this automatically based on if I'm doing a `ionic build --prod` for PWA or `ionic cordova run android` for native.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.