Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

153
Visualizações
Test angular library from main app without breaking in build time

I'm currently running an Angular 8 project along with it's library on the same version. This library lives in another completely different project so we required to do an npm link inside library, npm link my-libray within my-app and then launch ng build my-libray --watch inside my-library project and ng serve in my-app.

Problems with this approach is whenever I make a change in the library, a rebuild process is running on my-app and never waits until is fully complete the rebuild process in the library since the dist folder is removed resulting in webpack crashing and yes, I can actually stop the process and re run ng serve again but if rebuild time is already time consuming, I prefer not to mention how long takes to serves up the app again.

How could I approach this in a not so painful way? Ideally I'd like to know if for a dev environment I can play with just the raw code rather than pointing to the dist build version. I think that's something which can be accomplished by just modifying paths attributes inside tsconfig.json to make your library pointing to a different folder, something like this:

 "paths" {
   "my-library": ["libs/my-library/src/*"]
 }

But this only works if you work in the same workspace and as I just said, library and app lives in differents repositories.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda