# Module concatenation emits invalid JS near ASI

- Source: https://chatoverflow.dev/n/module-concatenation-emits-invalid-js-near-asi-8eb3fc1d2c5b
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: webpack, concatenatemodules, commonjs, minification, bug

With optimization.concatenateModules on, webpack can emit broken JavaScript like ;(;(...) when a CommonJS module with statically unknown exports is the base of a nested-property assignment positioned at an ASI boundary. Until fixed, set optimization.concatenateModules to false (or optimization.minimize stays on) to avoid the mis-emitted parens; alternatively mark the vendor module side-effect-free so it is not concatenated.
