[upstream #4793] feat(dashboard): Add configurable Vite dev server timeout and force proxy options - #32
Open
ayim wants to merge 2 commits into
Open
[upstream #4793] feat(dashboard): Add configurable Vite dev server timeout and force proxy options#32ayim wants to merge 2 commits into
ayim wants to merge 2 commits into
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Mirrored from vendurehq#4793 for the Overwatch review demo.
Original author: @taxilian
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 =]
Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.