Skip to content

Conversation

@xiaoxiaojx
Copy link
Member

@xiaoxiaojx xiaoxiaojx commented Jun 22, 2025

What kind of change does this PR introduce?

feature: ESM output mode to support splitChunks when externals and runtimeChunk are not set

The current test case removes the externals or runtimeChunk configuration split-chunks/webpack.config.js#L28 to reproduce the problem.

Did you add tests for your changes?

Yes

Does this PR introduce a breaking change?

No

What needs to be documented once your changes are merged?

No

@codspeed-hq
Copy link

codspeed-hq bot commented Jun 22, 2025

CodSpeed Performance Report

Merging #19619 will degrade performances by 67.07%

Comparing feat/esm_split_chunks (c4641fd) with main (09fda87)

Summary

⚡ 5 improvements
❌ 80 regressions
✅ 48 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
benchmark "cache-filesystem", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 224.4 ms 14.4 ms ×16
benchmark "devtool-source-map", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 34.8 ms 63.5 ms -45.2%
benchmark "future-defaults", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 52.6 ms 44 ms +19.49%
benchmark "lodash", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 11.5 ms 34.8 ms -67.07%
benchmark "many-chunks-commonjs", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 62.3 ms 49.2 ms +26.68%
benchmark "many-chunks-esm", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 61.1 ms 11.2 ms ×5.5
benchmark "many-modules-esm", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 47 ms 11.1 ms ×4.2
md4 buffer benchmark (size: 10000) 72.6 µs 114.1 µs -36.37%
md4 buffer benchmark (size: 120) 34.5 µs 76.2 µs -54.76%
md4 buffer benchmark (size: 160) 34.5 µs 76.1 µs -54.63%
md4 buffer benchmark (size: 16366) 97 µs 138.7 µs -30.07%
md4 buffer benchmark (size: 16368) 97 µs 138.6 µs -30%
md4 buffer benchmark (size: 16370) 97 µs 138.7 µs -30.03%
md4 buffer benchmark (size: 2) 34.4 µs 76.3 µs -54.83%
md4 buffer benchmark (size: 20) 32.1 µs 76.3 µs -57.91%
md4 buffer benchmark (size: 200) 34.8 µs 76.3 µs -54.45%
md4 buffer benchmark (size: 2000) 40.3 µs 81.9 µs -50.81%
md4 buffer benchmark (size: 20000) 111.1 µs 152.6 µs -27.15%
md4 buffer benchmark (size: 2002) 40.3 µs 82 µs -50.85%
md4 buffer benchmark (size: 40) 32 µs 73.6 µs -56.5%
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

@xiaoxiaojx xiaoxiaojx force-pushed the feat/esm_split_chunks branch from 0f06380 to 98e767e Compare June 22, 2025 15:07
@alexander-akait
Copy link
Member

@xiaoxiaojx Can you rebase?

@xiaoxiaojx xiaoxiaojx force-pushed the feat/esm_split_chunks branch from 98e767e to 4352242 Compare June 23, 2025 13:57
@xiaoxiaojx xiaoxiaojx force-pushed the feat/esm_split_chunks branch from 4352242 to c4641fd Compare June 23, 2025 14:10
@xiaoxiaojx
Copy link
Member Author

@alexander-akait Thanks for the review. I've rebased

@alexander-akait
Copy link
Member

@xiaoxiaojx Do we have bug report for this?

@alexander-akait alexander-akait merged commit c109f97 into main Jun 23, 2025
78 of 82 checks passed
@alexander-akait alexander-akait deleted the feat/esm_split_chunks branch June 23, 2025 18:21
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.

3 participants