diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2018-10-10 17:02:13 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-10-11 15:14:33 +0200 |
commit | 8bee392072a06890585292246f018c11bb5c55bd (patch) | |
tree | 0935137e6ac2a56a5a0f679e631b91ae59a62039 /server | |
parent | 4b9c8ad09c0dbf6b148f0de8d9062716755e1d28 (diff) | |
download | sonarqube-8bee392072a06890585292246f018c11bb5c55bd.tar.gz sonarqube-8bee392072a06890585292246f018c11bb5c55bd.zip |
display only biggest js assets
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-web/scripts/build.js | 6 |
1 files changed, 3 insertions, 3 deletions
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); |