File tree 1 file changed +5
-15
lines changed
1 file changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -1993,28 +1993,18 @@ class Server {
1993
1993
1994
1994
let isOutputModule = false ;
1995
1995
1996
- if ( typeof this . compiler . compilers !== "undefined" ) {
1997
- this . stats . stats . forEach ( ( stats ) => {
1998
- stats . compilation . assetsInfo . forEach ( ( value , key ) => {
1999
- const assetExtension = path . extname ( key ) ;
2000
- const assetBasename = path . basename ( key , assetExtension ) ;
2001
-
2002
- if ( assetBasename === outputFilename ) {
2003
- extension = assetExtension ;
2004
- isOutputModule = value . javascriptModule ;
2005
- }
2006
- } ) ;
2007
- } ) ;
2008
- } else {
2009
- this . stats . compilation . assetsInfo . forEach ( ( value , key ) => {
1996
+ const stats = this . stats . stats ? this . stats . stats : [ this . stats ] ;
1997
+
1998
+ for ( const item of stats ) {
1999
+ for ( const [ key , value ] of item . compilation . assetsInfo ) {
2010
2000
const assetExtension = path . extname ( key ) ;
2011
2001
const assetBasename = path . basename ( key , assetExtension ) ;
2012
2002
2013
2003
if ( assetBasename === outputFilename ) {
2014
2004
extension = assetExtension ;
2015
2005
isOutputModule = value . javascriptModule ;
2016
2006
}
2017
- } ) ;
2007
+ }
2018
2008
}
2019
2009
2020
2010
if ( isOutputModule ) {
You can’t perform that action at this time.
0 commit comments