Skip to content

fix(turbopack): honor IE targets in runtime output - #204

Draft
fireairforce wants to merge 2 commits into
utoofrom
zoomdong/fix-ie11-runtime-target
Draft

fireairforce wants to merge 2 commits into
utoofrom
zoomdong/fix-ie11-runtime-target

Conversation

@fireairforce

@fireairforce fireairforce commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

IE targets were treated as supporting arrows, allowing the library minifier to emit syntax outside ES5 and skip the final legacy emission. Treat IE as lacking arrow support. Avoid eager runtime dependencies on URL, Array.prototype.includes and Symbol.iterator when importing CommonJS modules.

Dynamic CommonJS star re-exports also failed to initialize without Proxy. Add a getter-based fallback that snapshots the original CommonJS enumerable export names while keeping values live, preserving static exports, the first source's precedence and getter receivers. Track raw CommonJS sources only when Proxy is unavailable so namespace conversion does not accidentally re-export hidden properties. The existing Proxy path is retained.

Validated through Pack's 13 runtime snapshot cases, including a minified IE11 UMD parsed in full as ES5 and executed in browser/CommonJS VM contexts without Symbol, URL or Proxy. The fixture exercises dynamic CommonJS re-exports, hidden/inherited properties, static precedence, live getters and function/string exports. Real Father/Webpack differential checks pass for both Pack compression modes without Proxy, including environments without Symbol, Reflect, URL or Array.prototype.includes, covering source priority, deleted/late keys, descriptors, receiver behavior and early cyclic references. Also checked a complete component-library UMD with ES5 parsing, cargo fmt, and clippy. Runtime TypeScript checks report the same existing diagnostics as the base revision. Actual IE11 browser execution has not been tested; this is not a claim of full bundler equivalence in all environments.

Parent integration and regression fixture: utooland/utoo#3412. Father configuration forwarding: umijs/father#873.

@github-actions

Copy link
Copy Markdown

Tests in progress

Commit: 0372d99
View workflow run

This branch has not been deployed

No deployments
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.

1 participant