Created
May 31, 2018 14:20
-
-
Save varl/00227ad3c1635049e62118a0cc1bd2c8 to your computer and use it in GitHub Desktop.
webpack bundle analyser monorepo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
WBA=./node_modules/.bin/webpack-bundle-analyzer | |
STATS_FILE=stats.json | |
for pkg in ./packages/*; do | |
file="${pkg}/${STATS_FILE}" | |
name="$(basename $pkg)" | |
$WBA "$file" "${pkg}/build" --mode static --report "reports/${name}.html" --no-open | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment