webpack wraps every module in a function, which costs a closure per module at parse and at runtime. Scope hoisting concatenates modules that can safely share a scope into one.
// webpack.config.js
plugins: [ new webpack.optimize.ModuleConcatenationPlugin() ]
// 340 modules → 41 wrapper functions
// bundle: 284 KB → 271 KB, parse time noticeably lower
The size saving is modest and the parse and execution improvement is the real gain, particularly on mobile. It only applies to ES modules — a CommonJS dependency cannot be hoisted — and it silently skips anything it cannot prove safe, so the reported module count is the way to tell whether it did anything. Enabled by default in production mode from webpack 4.