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
Unfortunately there is no way right now to specify the settings for sucrase. In our case, we wanted to disable the optional chaining polyfill that sucrase adds, since it's problematic for static analysis. The only way to do so seems to be by setting disableESTransforms: true in the options. It would be great if tsup had an option to set this.
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:
To be clear, @Mrtenz and I are willing to submit a PR for this feature. But we would need some guidance on how best to implement it. E.g. should we simply add a configuration option for this or automatically determine the value of disableESTransforms by looking at the target?
tsup
usessucrase
to transpile ESM to CJS when code splitting is enabled:tsup/src/plugins/cjs-splitting.ts
Lines 21 to 31 in 83c7c7f
Unfortunately there is no way right now to specify the settings for
sucrase
. In our case, we wanted to disable the optional chaining polyfill thatsucrase
adds, since it's problematic for static analysis. The only way to do so seems to be by settingdisableESTransforms: true
in the options. It would be great iftsup
had an option to set this.Upvote & Fund
The text was updated successfully, but these errors were encountered: