Skip to content
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

ng build --deploy-url does not work on scripts added through lazy loading or Service Workers #13894

Closed
lansana opened this Issue Mar 13, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@lansana
Copy link

lansana commented Mar 13, 2019

If I run this command:

ng build --deploy-url=https://cdn.acme.com/assets/

Then I expect my all of the scripts that are added dynamically to use that deploy URL, like this:

<script charset="utf-8" src="https://cdn.acme.com/assets/lazy-loaded-module.213123.js"></script>

I get this instead:

<script charset="utf-8" src="/assets/lazy-loaded-module.213123.js"></script>

I have a bundling process in my backend server on startup that will upload all assets to CloudFront global CDN, and since I can't seem to hook into the URLs for lazy-loaded modules, I'm not able to upload the to the CDN in production and as such my scripts are loaded from file server in the backend API, which I no longer want to support as I want to use CloudFront for serving all static assets.

I also have same issue with the Service Worker files.

Please advise.

@alan-agius4

This comment has been minimized.

Copy link
Collaborator

alan-agius4 commented Mar 13, 2019

Duplicate of #12322

@alan-agius4 alan-agius4 marked this as a duplicate of #12322 Mar 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.