File tree Expand file tree Collapse file tree 2 files changed +22
-17
lines changed Expand file tree Collapse file tree 2 files changed +22
-17
lines changed Original file line number Diff line number Diff line change 169
169
},
170
170
"childAssets" : {
171
171
"preload" : [
172
- " letters-C.js"
172
+ " letters-C.js" ,
173
+ " letters-C.js.map"
173
174
],
174
175
"prefetch" : [
175
176
" letters-D.js"
Original file line number Diff line number Diff line change @@ -111,14 +111,16 @@ class ChunkExtractor {
111
111
getChunkAssets ( chunks ) {
112
112
const one = chunk => {
113
113
const chunkGroup = this . getChunkGroup ( chunk )
114
- return chunkGroup . assets . map ( filename =>
115
- this . createChunkAsset ( {
116
- filename,
117
- chunk,
118
- type : 'mainAsset' ,
119
- linkType : 'preload' ,
120
- } ) ,
121
- )
114
+ return chunkGroup . assets
115
+ . map ( filename =>
116
+ this . createChunkAsset ( {
117
+ filename,
118
+ chunk,
119
+ type : 'mainAsset' ,
120
+ linkType : 'preload' ,
121
+ } ) ,
122
+ )
123
+ . filter ( chunkAsset => chunkAsset . scriptType )
122
124
}
123
125
124
126
if ( Array . isArray ( chunks ) ) {
@@ -132,14 +134,16 @@ class ChunkExtractor {
132
134
const one = chunk => {
133
135
const chunkGroup = this . getChunkGroup ( chunk )
134
136
const assets = chunkGroup . childAssets [ type ] || [ ]
135
- return assets . map ( filename =>
136
- this . createChunkAsset ( {
137
- filename,
138
- chunk,
139
- type : 'childAsset' ,
140
- linkType : type ,
141
- } ) ,
142
- )
137
+ return assets
138
+ . map ( filename =>
139
+ this . createChunkAsset ( {
140
+ filename,
141
+ chunk,
142
+ type : 'childAsset' ,
143
+ linkType : type ,
144
+ } ) ,
145
+ )
146
+ . filter ( chunkAsset => chunkAsset . scriptType )
143
147
}
144
148
145
149
if ( Array . isArray ( chunks ) ) {
You can’t perform that action at this time.
0 commit comments