You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I will try and simplify our setup to explain my use case.
We have a front-end project and NodeJS back-end project, with both projects using a common support library. The front end uses Rollup to bundle for the browser, the backend just compiles TypeScript to CJS (via TSC) to be executed by Node.
The plan originally was to use tsup to produce a CJS and ESM version of this library for maximum compatibility, which seems to be pretty straight forward.
The issue we have is that there is a package that we use in the support library that only ships as ESM.
While we can just add this package to noExternals it does mean that our ESM package is bigger than it needs to be, and also cant delegate tree-shaking etc to downstream bundlers.
Is it possible to have the contents of noExternals configurable by bundle format, so that some dependencies can be bundled and some cannot?
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.
The text was updated successfully, but these errors were encountered:
I will try and simplify our setup to explain my use case.
We have a front-end project and NodeJS back-end project, with both projects using a common support library. The front end uses Rollup to bundle for the browser, the backend just compiles TypeScript to CJS (via TSC) to be executed by Node.
The plan originally was to use tsup to produce a CJS and ESM version of this library for maximum compatibility, which seems to be pretty straight forward.
The issue we have is that there is a package that we use in the support library that only ships as ESM.
While we can just add this package to
noExternals
it does mean that our ESM package is bigger than it needs to be, and also cant delegate tree-shaking etc to downstream bundlers.Is it possible to have the contents of
noExternals
configurable by bundle format, so that some dependencies can be bundled and some cannot?Upvote & Fund
The text was updated successfully, but these errors were encountered: