#!/bin/sh
# Analyze stats

# Stop on errors
set -e

cd "$(dirname "$0")/.."

export STATS=1
statsfile="compilation-stats.json"

./node_modules/.bin/webpack-cli --profile --node-env=production --json=$statsfile
npx webpack-bundle-analyzer $statsfile hass_frontend/frontend_latest
rm -f $statsfile
