0

I started using NX recently. I have been trying to figure out their generators for a specific setup. I have a lib of react components that should be publishable. Due to constraints on an existing code base being ported across, I require a publishable package that has multiple entry points (I am using package.json's exports feature to do this in the past). However I cant find a generator setup that pulls this off.

If I use the standard 'npx nx g @nx/react:lib', it forces me to use a bundler. I do not want bundled code in a publishable library package. Why? Just why?

If I use something like: 'npm nx g lib' and choose tsc as the compiler, then it forces me to have a 'main' entry in my setup, which stops me from being able to have multiple entry points with 'exports'.

I really don't know what I'm supposed to use to solve this.

user2765977
  • 491
  • 4
  • 18

0 Answers0