fix: fix conflicts caused by multiple concatenateModules#19861
Conversation
CodSpeed Performance ReportMerging #19861 will degrade performances by 43.07%Comparing Summary
Benchmarks breakdown
|
|
I don't know if render order of modules is stable in webpack, if modules a,b and c render order changes, the output changes. |
|
@JSerFeng We’ve confirmed that webpack doesn’t have a render order stability issue. The PR has been merged — thanks for reporting the issue and suggesting the fix. |
|
The repro here, https://github.com/JSerFeng/webpack-unstable-order-repro/tree/main, you can switching comments in |
|
@JSerFeng Nice catch — this is an issue as well. Thanks for reporting it. |
|
Rspack does not fix this because we render modules totally in parallel, and before render we can't get any information of modules' usedNames, it's hard to fix it nicely for us. For webpack, it's single-threaded (for now), you can sort modules first before render |

What kind of change does this PR introduce?
Fixes #19641 (comment)
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