Skip to content

ServiceWorker are not using --deploy-url (Followup issue from 9753) #12312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
naveedahmed1 opened this issue Sep 19, 2018 · 3 comments
Closed

Comments

@naveedahmed1
Copy link

This is a followup issue from #9753

I tested my app with different configurations and below is my conclusion:

Using an HTML base HREF of https://cdn.domain.com and an Angular APP_BASE_HREF of / doesn't work.

Using an HTML base HREF of https://cdn.domain.com and dynamically setting Angular APP_BASE_HREF to mydomain.com works.

e.g.:

environment.appBaseHref: window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port:'')

{ provide: APP_BASE_HREF, useValue: environment.appBaseHref }

Though the second option works, but it introduces another issue, since we have now set the HTML base HREF to our CDN domain, this breaks other libraries that we are using. For example in my case
we are using other libraries such as Firebase Messaging for Push Notifications. When HTML base HREF is set to CDN it doesn't work.

I think we do need support for --deploy-url

So, when --deploy-url is provided, the urls generated in service worker should have the --deploy-url prepended to the assets.

@alan-agius4
Copy link
Collaborator

Closing as it doesn't follow the template.

Please file a new issue that follows the template. Thank you.

@naveedahmed1
Copy link
Author

@alan-agius4 is it necessary to follow template even if its in continuation of an already marked as solved issue?

I mentioned that its followup issue from #9753 which has been marked as solved, whereas the issue still exists.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants