I have an application build using Single-Spa and it consist of:
- Root Config App (hosted on http://localhost:3000)
- App1 (Angular application hosted on http://localhost:3001)
App1 has a dependency (npm package) Dep1. Dep1 provides img-preview.png file and PreviewComponent (which I use in App1) with this html:
<img src="/assets/images/img-preview.png">
When I open my app (by Root Config App) it tries to load the img-preview.png file from http://localhost:3000/assets/images/img-preview.png, but it won't work, because the file is served on http://localhost:3001.
For the assets that are directly under App1 I use the assetUrl helper method provided by single-spa-angular(angular-assets). However I cannot find any solution to load assets that are defined and used within npm dependencies. I cannot modify Dep1. The only way that seems feaseable is to replace Dep1 with my custom code, but that's just ludicrous.
Does anyone know how to solve it?