Skip to content

Commit

Permalink
Be more specific for killing hanging wrangler process.
Browse files Browse the repository at this point in the history
TODO: We may not need webpack. Migrate to rely on Wrangler's bundling?
https://developers.cloudflare.com/workers/wrangler/bundling/#bundling
  • Loading branch information
wenbinf committed Aug 17, 2024
1 parent cbb43b4 commit 63ded07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ if (prod) {
onBuildStart: {
// XXX: when edge-src/ has syntax error, webpack dev server will crash; after we restart, previous
// node processes may still be alive, which would take up the same PORT number and prevent dev server
// to run again. We have to kill all node process
scripts: ['pkill node'],
// to run again. We have to kill all wrangler processes
scripts: ['ps aux | grep -e "node_modules/wrangler" | grep -e "proxy" | awk \'{print $2}\' | xargs kill -9'],
blocking: true,
parallel: false
},
Expand Down

0 comments on commit 63ded07

Please sign in to comment.