File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const getRelativePath = (filePath) => {
10
10
}
11
11
12
12
const emitHandle = ( compilation , callback ) => {
13
- compilation . entrypoints . forEach ( ( { chunks} ) => {
13
+ function chunksHandle ( chunks ) {
14
14
const entryChunk = chunks . pop ( )
15
15
16
16
entryChunk . files . forEach ( filePath => {
@@ -39,7 +39,17 @@ const emitHandle = (compilation, callback) => {
39
39
assetFile . source = ( ) => content
40
40
} )
41
41
} )
42
- } )
42
+ }
43
+
44
+ if ( compilation . entrypoints instanceof Map ) {
45
+ compilation . entrypoints . forEach ( ( { chunks} ) => chunksHandle ( chunks ) )
46
+ } else {
47
+ Object . keys ( compilation . entrypoints ) . forEach ( key => {
48
+ const { chunks } = compilation . entrypoints [ key ]
49
+ chunksHandle ( chunks )
50
+ } )
51
+ }
52
+
43
53
callback ( )
44
54
}
45
55
You can’t perform that action at this time.
0 commit comments