Fix compressibility of modules while retaining portability#20287
Merged
alexander-akait merged 5 commits intowebpack:mainfrom Jan 12, 2026
Merged
Fix compressibility of modules while retaining portability#20287alexander-akait merged 5 commits intowebpack:mainfrom
alexander-akait merged 5 commits intowebpack:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 3ad4fa6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
dmichon-msft
commented
Jan 7, 2026
Comment on lines
17349
to
17360
| exports[`ConfigCacheTestCases css large exported tests should allow to create css modules: dev 1`] = ` | ||
| Object { | ||
| "placeholder": "my-app-tailwind_module_css-placeholder-gray-700", | ||
| } | ||
| `; | ||
|
|
||
| exports[`ConfigCacheTestCases css large exported tests should allow to create css modules: prod 1`] = ` | ||
| Object { | ||
| "placeholder": "Xk90he", | ||
| } | ||
| `; | ||
|
|
Contributor
Author
There was a problem hiding this comment.
Unexpected deletion
Member
|
Hi, do you need any help? |
Contributor
Author
|
@hai-x , mostly just got sidetracked, and was having some issues getting my environments to properly update the snapshot tests (they were exiting with OoM due to the low spec on the agent). I think this should be correct now? If there are still other issues, then yes, I might need some assistance getting this over. |
Member
|
Fixed the lint problem. |
alexander-akait
approved these changes
Jan 12, 2026
Contributor
|
This PR is packaged and the instant preview is available (03440e2). Install it locally:
npm i -D webpack@https://pkg.pr.new/webpack@03440e2
yarn add -D webpack@https://pkg.pr.new/webpack@03440e2
pnpm add -D webpack@https://pkg.pr.new/webpack@03440e2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses an issue raised by @sokra in #19184 with respect to sorting by final module id impairing compressibility of output code.
What kind of change does this PR introduce?
Fix for compressibility of output code while retaining portability of sort order.
Did you add tests for your changes?
Updated the existing test for default module sort order.
Does this PR introduce a breaking change?
Not unless code has taken a dependency on the rendered order of modules within a chunk, which nothing should be doing without itself controlling the rendered order.
If relevant, what needs to be documented once your changes are merged or what have you already documented?
For most customers, this will look equivalent to reverting #19184. The only time differences will appear is when comparing output across environments (Windows vs. Linux, different installation folders on Windows, etc.) for the same input code.