From 8bee392072a06890585292246f018c11bb5c55bd Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Wed, 10 Oct 2018 17:02:13 +0200 Subject: display only biggest js assets --- server/sonar-web/scripts/build.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/sonar-web/scripts') diff --git a/server/sonar-web/scripts/build.js b/server/sonar-web/scripts/build.js index 7084db2aa08..1b1a952c430 100644 --- a/server/sonar-web/scripts/build.js +++ b/server/sonar-web/scripts/build.js @@ -46,10 +46,10 @@ function build() { } const jsonStats = stats.toJson(); - const withoutSourceMaps = jsonStats.assets.filter(asset => !asset.name.endsWith('.map')); + const onlyJS = jsonStats.assets.filter(asset => asset.name.endsWith('.js')); - console.log(`Biggest assets (${withoutSourceMaps.length} total):`); - sortBy(withoutSourceMaps, asset => -asset.size) + console.log(`Biggest js chunks (${onlyJS.length} total):`); + sortBy(onlyJS, asset => -asset.size) .slice(0, 5) .forEach(asset => { let sizeLabel = formatSize(asset.size); -- cgit v1.2.3