I work in a mono repo which has a similar setup to this:
@repo/root
@my-company/my-awesome-package (public)
dependency: @repo/my-helper-package
@repo/my-helper-package (private)
I want to bundle and publish @my-company/my-awesome-package.
How it currently works
If I bundle with tsup it will not bundle @repo/my-helper-package in my output and if that output then is pushed to a registry the package is broken.
Currently I have the following line in my tsup.config.ts => noExternal: [/^@repo.*/], which will include all packages which start with @repo into the bundle.
What I would like to do
It would be cool if tsup has a config setting called something like bundlePrivatePackages: boolean. If its false it works like it does now. If its true though tsup would go and inspect the package.json file of imported packages and check if the package has "private": true set, if so it would include it in the output bundle if not leave the import statement.
Upvote & Fund
We're using Polar.sh so you can upvote and help fund this issue.
We receive the funding once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.
Context
I work in a mono repo which has a similar setup to this:
I want to bundle and publish
@my-company/my-awesome-package
.How it currently works
If I bundle with tsup it will not bundle
@repo/my-helper-package
in my output and if that output then is pushed to a registry the package is broken.Currently I have the following line in my
tsup.config.ts
=>noExternal: [/^@repo.*/],
which will include all packages which start with@repo
into the bundle.What I would like to do
It would be cool if tsup has a config setting called something like
bundlePrivatePackages: boolean
. If itsfalse
it works like it does now. If itstrue
though tsup would go and inspect the package.json file of imported packages and check if the package has"private": true
set, if so it would include it in the output bundle if not leave the import statement.Upvote & Fund