Skip to content

Load .env.local in Electron dev launcher #59

@germanescobar

Description

@germanescobar

Problem

electron/wait-and-launch.mjs reads process.env.VITE_DEV_SERVER_PORT directly when deciding which Vite URL to wait for before launching Electron.

However, Vite loads .env.local in development. The worktree setup script can write an offset VITE_DEV_SERVER_PORT into .env.local, so npm run dev:electron can end up with Vite serving on an offset port like 4501 while the Electron launcher waits for http://localhost:4500 and times out.

Expected behavior

npm run dev:electron should wait for the same Vite dev server port that Vite resolves from .env.local or another shared configuration source.

Notes

This was raised during review of PR #58. It is related to worktree port offsets, but separate from the native .coding-orchestrator/run.sh added in that PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions