Skip to content
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

Merged
merged 3 commits into from Dec 31, 2021
Merged

fix: support multiple targets #525

merged 3 commits into from Dec 31, 2021

Conversation

giuem
Copy link
Contributor

@giuem giuem commented Dec 31, 2021

The esbuild supports multiple targets, this PR aligned tsup's API to esbuild

@vercel
Copy link

vercel bot commented Dec 31, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/egoist/tsup/62ESYEfMunH7UB6caT7XKGQY1b7r
✅ Preview: https://tsup-git-fork-giuem-dev-egoist.vercel.app

@@ -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
}
Copy link
Owner

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

Copy link
Owner

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:

if (options.target === 'es5') {

Copy link
Contributor Author

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.
@egoist egoist changed the title feat: support multiple targets fix: support multiple targets Dec 31, 2021
@egoist egoist merged commit 2a42a02 into egoist:dev Dec 31, 2021
@github-actions
Copy link

🎉 This PR is included in version 5.11.10 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants