aspect-build / rules_esbuild

Bazel rules for https://esbuild.github.io/ JS bundler
https://docs.aspect.build/rules/aspect_rules_esbuild
Apache License 2.0
27 stars 27 forks source link

[FR]: support multiple targets, in line with cli api #146

Open jackvincentnz opened 1 year ago

jackvincentnz commented 1 year ago

What is the current behavior?

Currently we can only pass a single target string to the rule.

Describe the feature

The cli supports passing multiple targets and will bundle based on the minimum support needed.

See the example here: https://esbuild.github.io/api/#target

I think it should be a simple fix to support passing an array of target strings rather than a single string via the rule.

gregmagolan commented 1 year ago

Thanks for the suggestion. If it is supported by the CLI then we shouldn't prevent it with the rule API. Added this to the 1.0 milestone for this rule set.