Skip to content

Commit 25a054f

Browse files
Weijia Wangdevongovett
authored andcommitted
Fix asset size always be zero when building vue project (#1151)
1 parent 4189563 commit 25a054f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Bundle.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,11 @@ class Bundle {
206206
}
207207

208208
await packager.addAsset(asset);
209-
this.addAssetSize(asset, packager.getSize() - this.totalSize);
209+
210+
const assetSize = packager.getSize() - this.totalSize;
211+
if (assetSize > 0) {
212+
this.addAssetSize(asset, assetSize);
213+
}
210214
}
211215

212216
addAssetSize(asset, size) {

0 commit comments

Comments
 (0)