src/clean-webpack-plugin.ts
changed.
Other files ignored by Codecov
package.json
has changed.
README.md
has changed.
238 | 238 | /** |
|
239 | 239 | * Fetch Webpack's output asset files |
|
240 | 240 | */ |
|
241 | - | const assets = |
|
242 | - | stats.toJson({ |
|
243 | - | assets: true, |
|
244 | - | }).assets || []; |
|
245 | - | ||
246 | - | const relatedAssets = assets |
|
247 | - | .map((asset) => { |
|
248 | - | return ( |
|
249 | - | (asset.related && |
|
250 | - | Array.isArray(asset.related) && |
|
251 | - | asset.related) || |
|
252 | - | [] |
|
253 | - | ); |
|
254 | - | }) |
|
255 | - | .reduce((previousAssets, currentAssets) => { |
|
256 | - | return [...previousAssets, ...currentAssets]; |
|
257 | - | }, []); |
|
258 | - | ||
259 | - | const allAssets = [...assets, ...relatedAssets]; |
|
260 | - | const assetList = allAssets.map((asset) => { |
|
261 | - | return asset.name; |
|
262 | - | }); |
|
241 | + | const assetList = Object.keys(stats.compilation.assets); |
|
263 | 242 | ||
264 | 243 | /** |
|
265 | 244 | * Get all files that were in the previous build but not the current |
341 | 320 | throw new Error(message); |
|
342 | 321 | } |
|
343 | 322 | ||
323 | + | /* istanbul ignore next */ |
|
344 | 324 | throw error; |
|
345 | 325 | } |
|
346 | 326 | } |
Files | Coverage |
---|---|
src/clean-webpack-plugin.ts | 100.00% |
Project Totals (1 files) | 100.00% |