Skip to content

feat(dashboard): Add configurable Vite dev server timeout and force proxy options#4793

Open
taxilian wants to merge 2 commits into
vendurehq:minorfrom
HamStudy:feat/dashboard-vite-proxy-options
Open

feat(dashboard): Add configurable Vite dev server timeout and force proxy options#4793
taxilian wants to merge 2 commits into
vendurehq:minorfrom
HamStudy:feat/dashboard-vite-proxy-options

Conversation

@taxilian

@taxilian taxilian commented May 27, 2026

Copy link
Copy Markdown
Contributor

Adds two new options to DashboardPluginOptions:

  • viteDevServerTimeout (default: 1000) — Configurable timeout in milliseconds for detecting a running Vite dev server. Useful for slow or proxied connections (e.g. VPN) where the default 1s timeout is insufficient.
  • viteDevServerForceProxy (default: false) — When true, skips Vite dev server detection entirely and always proxies requests to it. Eliminates per-request latency overhead when you know Vite is running.

Both options are backward-compatible and default to existing behavior.


Context:

My frontend is a static site built using hugo; to avoid complications with CORS and cookies, I have it all on the same hostname. When developing, I use a proxy similar to ngrok (internal kubernetes black magic) to allow me to access everything over https on a dev domain.

The issue with this is that the default 1000ms vite check timeout periodically fails, likely due to the latency of going to the proxy, through the vpn, and to my laptop when I'm on some arbitrary connection somewhere. Thus, while I'm troubleshooting dashboard updates I keep getting the "vite isn't running" page. I wanted the option to disable that check when in dev mode, and I believe this should provide that. If I'm missing something obvious let me know =]


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.

@vercel

vercel Bot commented May 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vendure-storybook Ready Ready Preview, Comment May 28, 2026 5:13pm

Request Review

@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a1ce6d37-b727-4aef-8310-7328acfcf5b0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

…roxy options

Adds two new options to DashboardPluginOptions:
- viteDevServerTimeout: Configurable timeout for detecting Vite dev server
- viteDevServerForceProxy: Skip detection and always proxy to Vite

This helps users with slow or proxied connections (e.g. VPN) who
experience timeouts with the default 1000ms detection timeout.
@taxilian taxilian force-pushed the feat/dashboard-vite-proxy-options branch from 70e0286 to e962219 Compare May 27, 2026 23:05
@taxilian taxilian marked this pull request as ready for review May 28, 2026 17:11
@michaelbromley

Copy link
Copy Markdown
Member

Hi,

Thanks for the PR. I’m not yet decided on this - the use-case seems quite niche and in general I am averse to adding new config options for very special cases.

What tends to happen is that people over time come up with more and more suggestions for top-level options to handle this and that.

Sometimes they are legit. But sometimes it requires stepping back and thinking, maybe there is another approach that will solve not only this particular problem, but also others too.

That’s where I’m at with this. But I don’t have time to think about that right now, so I’m leaving this open.

Just wanted to give some feedback so you know it’s on the radar at least.

@taxilian

Copy link
Copy Markdown
Contributor Author

I understand the perspective, and I'd completely agree if you can give me literally any alternative workaround for this hardcoded value which leaves me entirely unable to do meaningful development =]

You could alternately hardcode it to a higher value, I suppose. I honestly don't see much benefit to making it auto switch; I'd much prefer just setting a config parameter to tell it which to use. Auto switching is neat if it works, but when it doesn't work it leaves one completely unable to work with the system.

Just my $0.02

@michaelbromley

Copy link
Copy Markdown
Member

Thanks for the feedback. For now I suggest you use patch-package so you can implement your workaround in a safe way.

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