Fix: Resolve blank Electron window caused by race contition between Vite and Electron #104
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes an issue that prevented the application from running properly in development mode on my machine (macos Tahoe 26.1)
Problems Addressed
Blank Electron Window Issue
When running
npm run dev, the Electron window would open but display completely blank. The root cause was a race condition where:Solutions Implemented
1. Configure Vite with Strict Port Binding (
vite.config.js)port: 5173andstrictPort: trueto the Vite server configuration2. Implement Sequential Startup (
package.json)wait-onpackage as a dev dependencydev:allscript to ensure Vite starts before Electron:Testing
npm run devnow starts without port conflictsFiles Changed
vite.config.js- Added port and strictPort configurationpackage.json- Added wait-on dev dependency and updated dev:all scriptpackage-lock.json- Updated lock file to include wait-on package