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

211
Visualizações
Nx workspace + Nest.js: separate bundle for each library

My problem is that whenever I run nx build api I get a single main.js which includes everything in my monorepo. What I want is my libraries having their own .js bundles. It can be clearly seen here angular-spotify . If you compile the project, you will see that each library has own bundle file. Here is what it looks like: example dist folder.

I also made an example repo showing my problem here: example repo. As you can see, all I have is main.js file, despite having also shared module, which is supposed to have its own bundle file.

My goal ultimately is being able to use typeorm migration feature with typescript. My typeorm entities are TS files which located in a separate lib, but migration works only with JS entities. Thus I need to compile my TS entities (which include imports from other libs) to JS files and specify folder in the dist in ormconfig.json like this dist/entities/*.js. But it is not possible if I only have bare main.js as output file.

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