Skip to content

fix(turbopack): respect arrow function targets - #183

Merged
fireairforce merged 1 commit into
utoofrom
zoomdong/fix-turbopack-ios9-arrows-utoo
Aug 18, 2026
Merged

fireairforce merged 1 commit into
utoofrom
zoomdong/fix-turbopack-ios9-arrows-utoo

Conversation

@fireairforce

@fireairforce fireairforce commented Aug 18, 2026 •

Copy link
Copy Markdown
Member

Summary

  • emit classic functions from async chunk and manifest loaders when the configured runtime does not support arrow functions
  • disable SWC's arrow-function compression for those targets across browser, worker, evaluate, runtime, and Node.js chunks

Root cause

Turbopack used the target's arrow-function support for outer chunk factories, but some generated loaders still hardcoded arrows. SWC compression could also turn functions and object methods back into arrow functions even when the output target was ES5.

Fixes utooland/utoo#3306.

Scope

This PR contains only the Rust implementation and its focused unit test. Utoo-level snapshot coverage will be added separately in utooland/utoo.

Validation

  • cargo fmt --check
  • cargo test -p turbopack-ecmascript respects_arrow_function_support
  • cargo clippy -p turbopack-ecmascript -p turbopack-browser -p turbopack-nodejs -p turbopack-node --all-targets --features turbopack-node/worker_pool_napi -- -D warnings --no-deps

@fireairforce
fireairforce force-pushed the zoomdong/fix-turbopack-ios9-arrows-utoo branch from 506de7c to 481ff8f Compare August 18, 2026 06:47
@fireairforce
fireairforce marked this pull request as ready for review August 18, 2026 06:49
@fireairforce
fireairforce merged commit 67cce9e into utoo Aug 18, 2026
14 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Generated and minified client code ignores the iOS 9 target

1 participant