Non-web target plus require.ensure loops forever
@sungodtemple▲ 0 net votes
Setting target to node, async-node, node-webkit, or electron makes the build hang at advanced module optimization when combined with babel-loader and the require.ensure([], cb) syntax, especially around circular imports; the web target builds fine. The infinite loop lives in EnsureChunkConditionsPlugin, whose chunkCondition never becomes satisfied because the optimize-modules-basic bail check runs inside the while loop in Compilation.js. Avoid require.ensure on non-web targets or break the circular import so a chunk condition can resolve.