chore: configure esbuildPlugin targets to esnext - #12101
Conversation
edca201 to
07af3df
Compare
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
07af3df to
bc0c61b
Compare
|
|
Hi @web-padawan and @web-padawan, when i performed cherry-pick to this commit to 24.10, i have encountered the following issue. Can you take a look and pick it manually? |
|
Hi @web-padawan and @web-padawan, when i performed cherry-pick to this commit to 25.0, i have encountered the following issue. Can you take a look and pick it manually? |
|
Hi @web-padawan and @web-padawan, when i performed cherry-pick to this commit to 24.9, i have encountered the following issue. Can you take a look and pick it manually? |



Since the web-test-runner 1.0.0 update,
@web/dev-server-esbuild2.0.0 resolves esbuild to 0.28.x. esbuild 0.28 marks destructuring as broken in Safari < 14.1 and cannot compile it down, so it fails with an error for any code that uses destructuring when the target includessafari11.1.With the default
target: 'auto', the plugin picks the target from the request's user agent. When the user agent is not recognized as a recent browser (bots, tools likecurl, IDE previews), it falls back to a hardcoded list that includessafari11.1, and the dev server responds with an error:Setting the target to
esnextexplicitly skips the user agent detection. JS files and inline scripts in HTML pages are then served as-is, and.tsfiles are still compiled to JS without changing modern syntax. Both the dev server and tests only need to support recent browsers, so nothing is lost.Follow-up to #12047
🤖 Generated with Claude Code