File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -408,7 +408,24 @@ class MiniCssExtractPlugin {
408
408
return obj ;
409
409
}
410
410
411
+ // This very awful workaround prevents a weird `<undefined>.pop()` in the plugin
412
+ // that's caused by who-knows-what (NOT related to dynamic imports).
413
+ // See this github issue for details:
414
+ // https://github.com/webpack-contrib/mini-css-extract-plugin/issues/257
411
415
renderContentAsset ( compilation , chunk , modules , requestShortener ) {
416
+ const [ chunkGroup ] = chunk . groupsIterable ;
417
+ let rv ;
418
+ const getModuleIndex2 = chunkGroup . getModuleIndex2 ;
419
+ try {
420
+ chunkGroup . getModuleIndex2 = null ;
421
+ rv = this . originalRenderContentAsset ( compilation , chunk , modules , requestShortener ) ;
422
+ } finally {
423
+ chunkGroup . getModuleIndex2 = getModuleIndex2 ;
424
+ }
425
+ return rv ;
426
+ }
427
+
428
+ originalRenderContentAsset ( compilation , chunk , modules , requestShortener ) {
412
429
let usedModules ;
413
430
414
431
const [ chunkGroup ] = chunk . groupsIterable ;
You can’t perform that action at this time.
0 commit comments