Using tsup and little configuration you can create your react or node packages easily:
https://medium.com/@sundargautam2022/creating-and-publishing-react-npm-packages-simply-using-tsup-6809168e4c86