Skip to content

fix(ui): drop --bun flag from Vite dev script#244

Merged
streamer45 merged 2 commits intomainfrom
devin/1775250123-fix-vite-dev-startup
Apr 3, 2026
Merged

fix(ui): drop --bun flag from Vite dev script#244
streamer45 merged 2 commits intomainfrom
devin/1775250123-fix-vite-dev-startup

Conversation

@staging-devin-ai-integration
Copy link
Copy Markdown
Contributor

@staging-devin-ai-integration staging-devin-ai-integration bot commented Apr 3, 2026

Summary

The dev script in ui/package.json used bunx --bun vite, which forces Vite to run under Bun's JavaScript runtime instead of Node.js. Vite v8's dep optimization (rolldown) runs 100–1000x slower under Bun's runtime, causing the slow just ui startup and connection hangs/timeouts:

Runtime Cold start Warm cache
bunx --bun vite 27s 242s
vite (Node.js) 200ms 214ms

The fix removes the --bun flag so the dev script uses bare vite (resolved from node_modules/.bin). This is consistent with how build and preview scripts already work in the same file. When invoked via bun run dev (from just ui), Bun still handles script launching and package resolution, but Vite itself executes on Node.js as designed.

Review & Testing Checklist for Human

  • Run just ui and verify dev server starts in <1s (vs 27s+ before)
  • Navigate to http://localhost:3045 and confirm the page loads instantly without hangs or retries
  • Verify HMR (hot module replacement) still works — edit a component and confirm live reload

Notes

The --bun flag has been present since the initial commit of package.json. It was likely added to leverage Bun's faster runtime, but Vite v8 has significant compatibility/performance issues when executed under Bun's runtime — particularly in the dep optimization phase which uses rolldown internally.

Link to Devin session: https://staging.itsdev.in/sessions/f0d68faf7b7d461981b676f000c47aa1
Requested by: @streamer45


Staging: Open in Devin

The dev script used `bunx --bun vite`, which forces Vite to run under
Bun's JavaScript runtime instead of Node.js. Vite v8's dep optimization
(rolldown) runs 100-1000x slower under Bun's runtime:

  bunx --bun vite: 27s cold / 242s warm
  vite (Node.js):  200ms cold / 200ms warm

This also caused connection hangs and timeouts because the dev server
was stuck in the slow optimization phase and couldn't serve requests.

Using bare `vite` (resolved from node_modules/.bin) is idiomatic and
consistent with the existing `build` and `preview` scripts. When
invoked via `bun run dev` (from `just ui`), Bun still handles script
launching and package resolution, but Vite itself executes on Node.js
as designed.

Signed-off-by: Devin AI <devin@streamkit.dev>
Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
@staging-devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown
Contributor Author

@staging-devin-ai-integration staging-devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Staging: Open in Devin
Debug

Playground

@streamer45 streamer45 merged commit d3ae5ec into main Apr 3, 2026
16 checks passed
@streamer45 streamer45 deleted the devin/1775250123-fix-vite-dev-startup branch April 3, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants