New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: support multiple targets #525
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/egoist/tsup/62ESYEfMunH7UB6caT7XKGQY1b7r |
@@ -97,6 +97,9 @@ export async function main(options: Options = {}) { | |||
const external = ensureArray(flags.external) | |||
options.external = external | |||
} | |||
if (flags.target) { | |||
options.target = flags.target.indexOf(',') >= 0 ? flags.target.split(',') : flags.target | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you can just do .split
without checking index
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops I guess this is necessary otherwise this will fail:
Line 11 in 529be68
if (options.target === 'es5') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I will revert previous change
This reverts commit 1ac2691.
🎉 This PR is included in version 5.11.10 🎉 The release is available on: Your semantic-release bot 📦🚀 |
The esbuild supports multiple targets, this PR aligned tsup's API to esbuild