We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0452bd commit 82f4380Copy full SHA for 82f4380
1 file changed
scripts/web-server-with-restart.sh
@@ -5,19 +5,22 @@
5
6
MAX_RESTARTS=10
7
RESTART_COUNT=0
8
-RESTART_DELAY=3
+RESTART_DELAY=1
9
10
echo "🚀 Starting webpack-dev-server with auto-restart (max restarts: $MAX_RESTARTS)"
11
12
run_wds () {
13
- node --expose-gc "$(npm root)/webpack-dev-server/bin/webpack-dev-server.js" --open --config config/webpack/webpack.dev.ts
+ node --expose-gc "$(npm root)/webpack-dev-server/bin/webpack-dev-server.js" $1 --config config/webpack/webpack.dev.ts
14
}
15
16
while [ $RESTART_COUNT -lt $MAX_RESTARTS ]; do
17
echo "📊 Attempt #$((RESTART_COUNT + 1)) - Starting webpack-dev-server..."
18
19
- # Run webpack-dev-server with memory monitoring
20
- run_wds
+ if [ $RESTART_COUNT -eq 0 ]; then
+ run_wds --open
21
+ else
22
+ run_wds --no-open
23
+ fi
24
25
# Capture exit code
26
EXIT_CODE=$?
0 commit comments