Skip to content

Commit

Permalink
fix: check the asset's existence before running filter
Browse files Browse the repository at this point in the history
  • Loading branch information
sodatea committed Sep 13, 2019
1 parent 9c6b367 commit 025c253
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/performance/SizeLimitsPlugin.js
Expand Up @@ -40,6 +40,7 @@ module.exports = class SizeLimitsPlugin {
entrypoint.getFiles().reduce((currentSize, file) => {
const asset = compilation.getAsset(file);
if (
asset &&
assetFilter(asset.name, asset.source, asset.info) &&
asset.source
) {
Expand Down

0 comments on commit 025c253

Please sign in to comment.