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

133
Views
Export multiple NPM packages from single directory

Suppose a Node app which is a "micro-UI". So it has its own UI components, maybe some Redux stuff, some classes to make API calls, etc.

I have need to export some part of this repo for consumption in other micro-UIs:

  • API classes should be exported as my-project-api NPM package.
  • UI things (React router, Redux stuff, UI components, API classes, etc.) should be exported as my-project-ui NPM package.

In other micro-UIs where I need the API classes from this repo (but not the UI components), I'll install my-project-api via NPM.

In the "main UI" project which gathers all micro-UIs and build a single SPA from them, I'll install my-project-ui via NPM.


So, my package.json needs to support publishing multiple package (e.g. the name field needs to be flexible). How can this be accomplished without splitting the API source from the non-API source?

I think the answer is likely to split out the API components / UI components into their own packages in the same repo. But I'm wondering if there's another way.

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!