Serve angular assets from a specific url

Viewed 273

I have a website (powered by Angular 9 and Universal), which is served from a domain. I want the assets to be served by our asset provider, instead of our current universal express server.

  • https://{{locale}}.domain.com is the main entrypoint for our app
  • https://somecdn.com/folder/{{locale}} is the main entrypoint for our assets

It means if we have this kind of asset locally:

app/
  somechunk.js
  assets/
    style.css

Then it should be served from the urls

https://assets.otherdomain.com/app/{{locale}}/assets/style.css
https://assets.otherdomain.com/app/{{locale}}/somechunk.js

I tried few things with baseHref without success. Don't know if it's possible with some angular options, or if I should add some custom build step to update these url...

Any idea? Thanks a lot


PS: some useful resource I run into while searching for a solution to this issue:

0 Answers
Related