#How to tell angular to resolve js files from another domain?

3 messages · Page 1 of 1 (latest)

frozen bluff
#

Angular build generates the js files in local path like that:

<script src="runtime.e3e5e013ccdab55c.js" type="module">

How tell angular to add string to the generated scripts? something like that:

<script src="https://domain/bla/runtime.e3e5e013ccdab55c.js" type="module">

I don't want to use baseHref because it apply to xhr calls and they I don't want to change.

left patio
#

Try to build passing

ng b --base-href="https://domain/bla/"

and providing an APP_BASE_HREF pointing to usual root path

{ provide: APP_BASE_HREF, useValue: '/' }
frozen bluff
#

Thank you @left patio !!