Skip to content

Commit b83b20d

Browse files
committed
chore(dev): improve dev server startup with wait-on and fixed port
1 parent d36d981 commit b83b20d

File tree

4 files changed

+214
-10
lines changed

4 files changed

+214
-10
lines changed

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
"pnpm": ">=10.0.0"
1414
},
1515
"scripts": {
16-
"dev": "npm run build:main && concurrently -k \"vite\" \"npm:dev:main\" \"npm:dev:start\"",
16+
"dev": "cross-env DEV_PORT=5177 concurrently -k \"vite\" \"npm:dev:main\" \"npm:dev:start\"",
1717
"dev:main": "nodemon",
18-
"dev:start": "cross-env NODE_ENV=development electronmon .",
18+
"dev:start": "wait-on tcp:5177 build/main/index.js && cross-env NODE_ENV=development DEV_PORT=5177 electronmon .",
1919
"build": "vite build && npm run build:main && electron-builder",
2020
"build:mac": "vite build && npm run build:main && npm run build:mac:x64 && npm run build:mac:arm64",
2121
"build:mac:x64": "vite build && npm run build:main && electron-builder --mac --x64",
@@ -149,7 +149,8 @@
149149
"vitest": "^4.0.18",
150150
"vue": "^3.5.13",
151151
"vue-router": "^4.5.0",
152-
"vue-tsc": "^3.2.5"
152+
"vue-tsc": "^3.2.5",
153+
"wait-on": "^9.0.4"
153154
},
154155
"pnpm": {
155156
"onlyBuiltDependencies": [

0 commit comments

Comments
 (0)