Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

210
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!