mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-28 02:58:04 +08:00
Deploying apps with service workers can be tricky. This commit has the CLI copy the safety-worker.js file from @angular/service-worker (if it's present) into the dist/ directory of the bundled app, both providing a quick option for developers who need to deactivate an already installed worker. It also copies the file into the path dist/worker-basic.min.js, used by apps built on the previous SW. Once a SW path is deployed on the web, it needs to be served until all users have migrated off of that path.