shellscape / webpack-manifest-plugin

webpack plugin for generating asset manifests
MIT License
1.44k stars 184 forks source link

Slow in webpack 5 #244

Closed domarmstrong closed 3 years ago

domarmstrong commented 3 years ago

Expected Behavior / Situation

Plugin is fast

Actual Behavior / Situation

Plugin is slow

Modification Proposal

Hi. I've found that our webpack rebuild time is quite slow when upgrading to webpack 5. One of the reasons seems to be the call to stats.toJson in emitHook. I noticed that all: false is commented out in https://github.com/shellscape/webpack-manifest-plugin/commit/2702efb04a0c54da7ce17a082c5022e6ad9e71e6#diff-9c0b469fe528c4695452cbd66ea7ba2845b967ff897481f6e0d66c4d963cbfccR42, adding this back in dramatically increases the processing time. Was there a reason this was commented out, or can it be added back? I see no adverse affects in our build by enabling it again.

// all: false commented out
stats: 1.697s
// all: false enabled
stats: 12.53ms
domarmstrong commented 3 years ago

Awesome, thank you 👍