Rebuilding After Code Changes
Rebuilding After Code Changes
When you update code and want a new installer, rebuild the changed part then re-run
If it is still in development: npm run pack.
If it already has a sharable .exe file: npm run dist:win.
What to rebuild
Delete the
| What changed | Rebuild step | Development | Live |
|---|---|---|---|
| Frist step | release/win-unpacked folder | Delete the release folder | |
| Frontend code | npm run build:frontend |
npm run dist:win |
|
| Backend code | npm run build:backend |
npm run dist:win |
|
| Python/AI service code | cd aiservice && python build.py |
npm run dist:win |
|
| Electron code | npm run build:electron |
npx electron-builder --dir |
npm run dist:win |
npm run dist:win already runs build:backend, build:frontend, and build:electron automatically — the only thing it doesn't do is python build.py (separate toolchain).
Day-to-day development
Nothing changes. You still use npm run dev, npm run desktop and/or .\release\win-unpacked\EPIC.exe as before — you only rebuild the installer when you want to share a new version.