ServiceWorker are not using --deploy-url
See original GitHub issueThe service worker is loaded from the base url which is not working if i set a deploy-url
Versions
Angular CLI: 1.6.5
Node: 8.9.4
OS: darwin x64
Angular: 5.2.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, service-worker
@angular/cli: 1.6.5
@angular-devkit/build-optimizer: 0.0.42
@angular-devkit/core: 0.0.29
@angular-devkit/schematics: 0.0.52
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.5
@schematics/angular: 0.1.17
typescript: 2.6.2
webpack: 3.10.0
Repro steps
- ng build --deploy-url something/different/than/the/base/url
Observed behavior
Angular uses the base url instead of deploy-url
Desired behavior
The service worker is loaded by following rules:
- take absolute url if given
- fallback to deploy-url
- fallback to base url
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:15 (3 by maintainers)
Top Results From Across the Web
ServiceWorker are not using --deploy-url #12322 - GitHub
I need to build the app using --deploy-url specifically (and not with href) and the urls generated in the service worker do not...
Read more >Angular application in custom url path, with ServiceWorker
One way to modify paths that Angular generates while building is to use the --deploy-url option with CLI's ng build . In combination...
Read more >angular/angular-cli - Gitter
hey guys, how use --deploy-url feature when use webpack(@ngtools/webpack)? ... on gh-pages ( http://susper.com ) is not serving files using service worker.
Read more >Deployment - Angular
A command line option used to specify the base path for resolving relative URLs for assets such as images, scripts, and style sheets...
Read more >Concept - Intershop Progressive Web App - Deploy URL
Deploy URL. This document describes how to provide the Intershop PWA with a dynamic deploy URL to set up client-side retrieval of static ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is quite an important bug. Can we maybe remove the
freq1: low
tag so it gets a little more attention and love?For anyone reading this, I managed to get around without too much messing around by re-generating the ngsw.json with the following command
in my case