webpack: hide internal assets and source maps in stats

This commit is contained in:
Pooya Parsa 2017-08-01 01:50:33 +04:30
parent 29ed894c43
commit b460e4e2f2

View File

@ -377,7 +377,8 @@ export default class Builder extends Tapable {
// Hide internal assets and source maps in stats
const hiddenAssets = [
/.map$/,
/index\..+\.html$/
/index\..+\.html$/,
/vue-ssr-client-manifest.json/
]
const statsJson = stats.toJson(this.webpackStats, true)
statsJson.assets = statsJson.assets.filter(asset => hiddenAssets.every(e => !e.test(asset.name)))