Skip to content

Build takes twice as long with >=5.92.0 compared to 5.91.0 #18694

@mandykoh

Description

@mandykoh

Bug report

What is the current behavior?

Our project takes around 55 sec to build with Webpack versions 5.92.0 and later (tested up to 5.93.0), compared to 24 sec on 5.91.0 and earlier with no other changes.

⬡ webpack: 673 assets
  runtime modules 1.9 MiB 1835 modules
  orphan modules 408 KiB [orphan] 209 modules
  built modules 14.5 MiB (javascript) 5.88 MiB (asset) [built]
    javascript modules 13.4 MiB
      modules by path ./node_modules/ 2.76 MiB 753 modules
      modules by path ./src/ 10.6 MiB 559 modules
      ./languages/ lazy ^\.\/.*\.json$ namespace object 160 bytes [optional] [built] [code generated]
    asset modules 9.56 KiB (javascript) 5.88 MiB (asset) 233 modules
    json modules 1.11 MiB
      optional modules 929 KiB [optional] 7 modules
      modules by path ./src/ 78.4 KiB
        …
  webpack 5.92.0 compiled successfully in 55360 ms

A very long time seems to be spent at this stage:

● Webpack █████████████████████████ sealing (89%)
 after hashing

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

Build times similar to the previous version:

⬡ webpack: 673 assets
  runtime modules 1.9 MiB 1835 modules
  orphan modules 408 KiB [orphan] 209 modules
  built modules 14.5 MiB (javascript) 5.88 MiB (asset) [built]
    javascript modules 13.4 MiB
      modules by path ./node_modules/ 2.76 MiB 753 modules
      modules by path ./src/ 10.6 MiB 559 modules
      ./languages/ lazy ^\.\/.*\.json$ namespace object 160 bytes [optional] [built] [code generated]
    asset modules 9.56 KiB (javascript) 5.88 MiB (asset) 233 modules
    json modules 1.11 MiB
      optional modules 929 KiB [optional] 7 modules
      modules by path ./src/ 78.4 KiB
        …
  webpack 5.91.0 compiled successfully in 24074 ms

Other relevant information:
webpack version: See above
Node.js version: 20.16.0
Operating System: macOS 14.6.1
Additional tools: Svelte project (predominantly compiled static HTML/JS)

Let me know how I can help diagnose.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions