fix: test262 runner module rules override with { type: 'text' }#20665
fix: test262 runner module rules override with { type: 'text' }#20665alexander-akait merged 3 commits intomainfrom
Conversation
|
|
This PR is packaged and the instant preview is available (aa4705a). Install it locally:
npm i -D webpack@https://pkg.pr.new/webpack@aa4705a
yarn add -D webpack@https://pkg.pr.new/webpack@aa4705a
pnpm add -D webpack@https://pkg.pr.new/webpack@aa4705a |
The test262 runner's module rule forces all .js files to javascript/esm,
overriding the default asset/source handling for `with { type: 'text' }`.
Add `text` to the exclusion list alongside `bytes`.
Add test262 import-text cases to skip list (compilation works but
vm.SourceTextModule execution times out).
Add configCases test for .js file imported as text via with { type: 'text' }.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
aeaee11 to
74aed84
Compare
Merging this PR will degrade performance by 51.06%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Memory | benchmark "future-defaults", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' |
334.7 KB | 683.8 KB | -51.06% |
| ⚡ | Memory | benchmark "devtool-source-map", scenario '{"name":"mode-production","mode":"production"}' |
7.5 MB | 6.2 MB | +21.19% |
| ⚡ | Memory | benchmark "asset-modules-source", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' |
391.5 KB | 266.7 KB | +46.79% |
| ⚡ | Memory | benchmark "react", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' |
863.4 KB | 645.3 KB | +33.79% |
Comparing fix/test262-import-text (09f3e23) with main (a836e06)
Summary
The test262 runner's module rule forces all .js files to javascript/esm, overriding the default asset/source handling for
with { type: 'text' }. Addtextto the exclusion list alongsidebytes.Add test262 import-text cases to skip list (compilation works but vm.SourceTextModule execution times out).
Add configCases test for .js file imported as text via with { type: 'text' }.
What kind of change does this PR introduce?
test
Did you add tests for your changes?
Yes
Does this PR introduce a breaking change?
No