Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

211
Vistas
Angular single-spa.js is changing deep import urls to localhost

I´m using single-spa library (v 5.8.2) with multiple angular projects. When i try to import ngx-quill (library which imports another library (quill.js)), the single spa library replaces the default import url with localhost:9000 (the url root loads into).

network data

I have followed the single-spa instructions to modify the scss url, images and other own elements, but remember that in this case, the import call is made from an external library, which should not be modified.

I have also tried to insert my own interceptor in which, if it detects that specific url, it is replaced by the one I want, but since this call is not REST, it does not go through that one and I cannot modify it.

Is it possible to make single-spa by default modify the routes so that they access the corresponding node_modules?

Thank you!.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

the single spa library replaces the default import url

single-spa does not do anything at build time and is only used in the browser.

What is actually happening is that ng-quill likely makes use of relative references to external assets. This could be in JavaScript (import "./styles.css") or in CSS (@import("./styles.css") but in either case, this means that in the browser the app will try to resolve those. But those URLs being relative means that they're relative to the origin that loaded the asset, which is the root config. That is why you're seeing those URLs.

Is it possible to make single-spa by default modify the routes so that they access the corresponding node_modules?

The answer to this is no, because single-spa is not what is causing this. You need to instead configure your build tool (Webpack is what Angular uses I believe) and handle the processing of those URLs. The single-spa-angular Angular community has documented them here https://single-spa.js.org/docs/ecosystem-angular/#styles

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda