gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
73.49k stars 7.37k forks source link

Support more recent targets with js.Build / esbuild #12575

Closed apiontek closed 3 weeks ago

apiontek commented 3 weeks ago

Per js.Build docs the target option supports values including es2015 through es2020, which refer to esbuild's target option.

However, esbuild currently supports additional, more recent targets: es2021, es2022, es2023. I've tested that I can use them with raw esbuild, but they do not work when passed to js.Build in hugo.

Proposal is to add support for those targets to js.Build in hugo, for those who want to use a more recent target without jumping to the bleeding edge esnext.