Repository navigation
fix(desktop): run Vite directly in Tauri dev command - #3515
kiranmagic7 wants to merge 1 commit into
Conversation
Signed-off-by: kiranmagic7 <262980978+kiranmagic7@users.noreply.github.com>
Tauri runs beforeDevCommand through cmd /C on Windows, which has no exec and cannot execute the extensionless .bin/vite shim, so just dev fails before the app starts. Vite's Node entry point is portable; exec is kept elsewhere so Tauri's Ctrl+C still reaches Vite directly. Complements block#3515, which fixes the same launch for tauri.conf.json but not for the instance-env.sh path that just dev uses. Signed-off-by: sumit-m <33051892+sumit-m@users.noreply.github.com>
Tauri runs beforeDevCommand through cmd /C on Windows, which has no exec and cannot execute the extensionless .bin/vite shim, so just dev fails before the app starts. Vite's Node entry point is portable; exec is kept elsewhere so Tauri's Ctrl+C still reaches Vite directly. Complements block#3515, which fixes the same launch for tauri.conf.json but not for the instance-env.sh path that just dev uses. Signed-off-by: sumit-m <33051892+sumit-m@users.noreply.github.com>
Tauri runs beforeDevCommand through cmd /C on Windows, which has no exec and cannot execute the extensionless .bin/vite shim, so just dev fails before the app starts. Vite's Node entry point is portable; exec is kept elsewhere so Tauri's Ctrl+C still reaches Vite directly. Complements block#3515, which fixes the same launch for tauri.conf.json but not for the instance-env.sh path that just dev uses. Signed-off-by: sumit-m <33051892+sumit-m@users.noreply.github.com>
|
Status check on head Review focus: the single-line bare Tauri dev command in |
Tauri runs beforeDevCommand through cmd /C on Windows, which has no exec and cannot execute the extensionless .bin/vite shim, so just dev fails before the app starts. Vite's Node entry point is portable; exec is kept elsewhere so Tauri's Ctrl+C still reaches Vite directly. Complements block#3515, which fixes the same launch for tauri.conf.json but not for the instance-env.sh path that just dev uses. Signed-off-by: sumit-m <33051892+sumit-m@users.noreply.github.com>
|
#3534 now includes a Windows 11 smoke test of the same |
Use pnpm's project-local executable resolution instead of coupling the Tauri dev command to Vite's internal JavaScript entry point. Preserve the POSIX exec handoff outside Windows, skip the macOS icon generator elsewhere, and cover both generated command variants with a CI contract test. Builds on the platform handling from block#3515 and block#3534. Signed-off-by: Aria-iu <2357648739@qq.com>
Tauri runs beforeDevCommand through cmd /C on Windows, which has no exec and cannot execute the extensionless .bin/vite shim, so just dev fails before the app starts. Vite's Node entry point is portable; exec is kept elsewhere so Tauri's Ctrl+C still reaches Vite directly. Complements block#3515, which fixes the same launch for tauri.conf.json but not for the instance-env.sh path that just dev uses. Signed-off-by: sumit-m <33051892+sumit-m@users.noreply.github.com>
|
Current |
|
|
|
I missed #7164 in the earlier overlap checks. It supersedes this narrower change: the same |
Summary
Runs Vite through its Node entry point in Tauri's default
beforeDevCommand.The current command relies on the POSIX
execshell builtin, which is unavailable under Windowscmd.exe. Direct Tauri development commands that readdesktop/src-tauri/tauri.conf.jsontherefore fail before the app starts. Calling Vite's published Node entry point is portable without changing how Vite starts on macOS or Linux.The
justrecipes that start Tauri provide a generated config fromscripts/instance-env.sh; #3534 covers that path.just desktop-devalready callspnpm exec vitedirectly and is not affected.Related issue
Extracted from the maintainer request in #2506. Complements #3534.
Testing
node ./node_modules/vite/bin/vite.js --versionreturnedvite/8.0.16 darwin-arm64 node-v24.15.0.pnpm --dir desktop checkpassed.just cipassed.A Windows smoke test was not available locally. This changes configuration only, so screenshots do not apply.