Skip to content

chore: configure esbuildPlugin targets to esnext - #12101

Merged
web-padawan merged 1 commit into
mainfrom
esbuild-esnext-target
Jul 10, 2026
Merged

chore: configure esbuildPlugin targets to esnext#12101
web-padawan merged 1 commit into
mainfrom
esbuild-esnext-target

Conversation

@web-padawan

@web-padawan web-padawan commented Jul 10, 2026

Copy link
Copy Markdown
Member

Since the web-test-runner 1.0.0 update, @web/dev-server-esbuild 2.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 includes safari11.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 like curl, IDE previews), it falls back to a hardcoded list that includes safari11.1, and the dev server responds with an error:

$ curl http://localhost:8000/dev/combo-box.html
Error while transforming dev/combo-box.html: Transforming destructuring to the
configured target environment ("chrome64", "edge79", "firefox67", "safari11.1")
is not supported yet

Setting the target to esnext explicitly skips the user agent detection. JS files and inline scripts in HTML pages are then served as-is, and .ts files 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

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@web-padawan
web-padawan force-pushed the esbuild-esnext-target branch from 07af3df to bc0c61b Compare July 10, 2026 11:05
@sonarqubecloud

Copy link
Copy Markdown

@vaadin-bot

Copy link
Copy Markdown
Collaborator

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?
Error Message:
Error: Command failed: git cherry-pick 940abcb
error: could not apply 940abcb... chore: configure esbuildPlugin target to esnext (#12101)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

@vaadin-bot

Copy link
Copy Markdown
Collaborator

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?
Error Message:
Error: Command failed: git cherry-pick 940abcb
error: could not apply 940abcb... chore: configure esbuildPlugin target to esnext (#12101)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

@vaadin-bot

Copy link
Copy Markdown
Collaborator

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?
Error Message:
Error: Command failed: git cherry-pick 940abcb
error: could not apply 940abcb... chore: configure esbuildPlugin target to esnext (#12101)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

sissbruecker pushed a commit that referenced this pull request Jul 10, 2026
…12105)

## Description

Cherry-pick of #12101 to `24.10` branch.

## Type of change

- Cherry-pick
sissbruecker pushed a commit that referenced this pull request Jul 10, 2026
…12106)

## Description

Cherry-pick of #12101 to `24.9` branch.

## Type of change

- Cherry-pick
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants