jaredpalmer / tsdx

Zero-config CLI for TypeScript package development
https://tsdx.io
MIT License
11.26k stars 508 forks source link

Export multiple React components? #748

Closed aaronbalthaser closed 4 years ago

aaronbalthaser commented 4 years ago

Current Behavior

It seems the end user must import all the code from the library.

Desired Behavior

Is there a way to import react components as stand alone components without the entire project build

Additional context

Forgive me as this is more of a question. I could not find any forums to contact anyone. I was trying to understand if this project allows for a way to allow the end user of the library to import individual components as opposed to the entire project build. For example a typical import of all project code would be:

import { Button, Heading } from 'whatever-library';

But the user can import only the Button code and obviously any dependences used by Button component using something like:

import { Button } from 'whatever-library/lib';

Thanks.

agilgur5 commented 4 years ago

Duplicate of #713