The production of webpack2 creates a very slow "additional processing of assets"

I have a large webpack assembly that almost hangs at 91% at the “additional processing of assets” stage, which does not give me much more information. Only this step consumes up to 4 minutes and seems to grow almost exponentially when we add modules to the assembly. Is there a way to better understand what has been done at this stage and ultimately optimize it?

56205ms building modules
31ms sealing
0ms optimizing
0ms basic module optimization
15ms module optimization
0ms advanced module optimization
0ms basic chunk optimization
0ms chunk optimization
16ms advanced chunk optimization
14487ms building modules
0ms module and chunk tree optimization
31ms module reviving
0ms module order optimization
16ms module id optimization
0ms chunk reviving
16ms chunk order optimization
31ms chunk id optimization
140ms hashing
0ms module assets processing
265ms chunk assets processing
0ms additional chunk assets processing
0ms recording
206740ms additional asset processing
79781ms chunk asset optimization
1ms asset optimization
906ms emitting
+7
source share
2 answers

Not sure what you have, but in my case it was Webpack and Extract Text, which caused long loads. I switched to Webpack 2.7.0 and extract-text-webpack-plugin 2.1.2, and the download returned to normal.

+1

webpack babili ( babel-minify-webpack-plugin). uglifyjs-webpack-plugin.

:

new UglifyJSPlugin({
  parallel: true,
  exclude: /\/node_modules/,
  uglifyOptions: {
    ecma: 8,
    mangle: true,
    compress: {
      sequences: true,
      dead_code: true,
      conditionals: true,
      booleans: true,
      unused: true,
      if_return: true,
      join_vars: true,
      drop_console: true
    },
    output: {
      comments: false,
      beautify: false
    }
  }
})
0

Source: https://habr.com/ru/post/1015861/


All Articles