File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ portfinder
1212 port : basePort ,
1313 } )
1414 . then ( ( port ) => {
15- const devServer = `./scripts/start-dev-with-auto-restart.sh --port ${ port } --env platform=desktop --no-open ` ;
15+ const devServer = `./scripts/start-dev-with-auto-restart.sh --port ${ port } --env platform=desktop` ;
1616 const buildMain = 'webpack watch --config config/webpack/webpack.desktop.ts --config-name desktop-main --mode=development' ;
1717
1818 const env = {
Original file line number Diff line number Diff line change @@ -12,7 +12,14 @@ RESTART_DELAY=1
1212echo " 🚀 Starting webpack-dev-server with auto-restart (max restarts: $MAX_RESTARTS )"
1313
1414run_wds () {
15- node --expose-gc ./node_modules/.bin/webpack-dev-server " $1 " " ${WDS_ARGS[@]} " --config config/webpack/webpack.dev.ts
15+ # Check if platform is Desktop to determine open behavior
16+ if [[ " ${WDS_ARGS[*]} " == * " --env platform=desktop" * ]]; then
17+ # For Desktop, always use --no-open since app is handled by Electron
18+ node --expose-gc --max-old-space-size=1100 ./node_modules/.bin/webpack-dev-server --no-open " ${WDS_ARGS[@]} " --config config/webpack/webpack.dev.ts
19+ else
20+ # For Web, use the provided open flag
21+ node --expose-gc ./node_modules/.bin/webpack-dev-server " $1 " " ${WDS_ARGS[@]} " --config config/webpack/webpack.dev.ts
22+ fi
1623}
1724
1825while [ $RESTART_COUNT -lt $MAX_RESTARTS ]; do
You can’t perform that action at this time.
0 commit comments