-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Description
Bug report
What is the current behavior?
Currently, some dependencies are bundled differently depending on the platform that the bundle operation is being performed on. In the attached minimal repro, the jszip package is bundled on both Linux and Windows machines. The bundle output contains the exact same content, except for one specific module is being included in the bundle at a different point depending on the platform. Interestingly, the module IDs remain the same (as would be expected with deterministic module IDs), it's just the order of entry in the output bundle.
Example diff:
Note that changing the ordering of the module entries ensures that there is no diff between the two produced bundles.
If the current behavior is a bug, please provide the steps to reproduce.
Using the included repro:
npm inpm run buildand observe the outputs on Linux- Perform same operation on Windows
- Compare the two generated files
For convenience, I've included the bundle output in the repro zip for both Linux and Windows.
What is the expected behavior?
Module ordering in bundle output should be deterministic on both platforms when using deterministic module IDs
Other relevant information:
webpack version: 5.95.0
Node.js version: 18.19.1
Operating System: Linux/Windows
Additional tools: jszip
