Last active
September 5, 2019 18:30
-
-
Save jgcmarins/89fc87a83f37dfad5bda66b1911ade6a to your computer and use it in GitHub Desktop.
Keeps restarting Webpack when dying due memory leak
This file contains hidden or 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 | |
# Example: sh ./scripts/restart-webpack.sh yarn start | |
# where `start` is defined as `webpack-dev-server --config webpack.config.js --progress` | |
# at package.json | |
# Related issue: https://github.com/webpack/webpack/issues/6929 | |
until $1 $2; do | |
echo "Webpack crashed with exit code $?. Respawning..." >&2 | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment