@jimdo/webpack-stats-diff

Diffs two webpack stats outputs (e.g. via stats-webpack-plugin) and gives back an object with file size changes in a human readable format

Usage no npm install needed!

<script type="module">
  import jimdoWebpackStatsDiff from 'https://cdn.skypack.dev/@jimdo/webpack-stats-diff';
</script>

README

webpack-stats-diff

Diffs two webpack stats outputs (e.g. via stats-webpack-plugin) and gives back an object with file size changes in a human readable format

Install it

npm i --save-dev @jimdo/webpack-stats-diff

Run it

# Download production stats.json 
wget -q -O production-stats.json http://jenkins.prod.aws.jimdo-server.com/job/production-pipeline/job/assets-for-cdn-to-s3/lastSuccessfulBuild/artifact/target/stats.json
# Fetch branch stats.json
cp ../jimdo/build/assets/stats.json ./branch-stats.json
# Run tool
$(npm bin)/webpack-stats-diff ./production-stats.json ./branch-stats.json

Example output

{
  "lazy/Siteadmin.Newemail": "-113.89kB",
  "lazy/Blog": "-113.95kB",
  "cms.js": "114.9kB",
  "wrapper.angular.js": "-114.75kB"
}