[GH-ISSUE #85] Vite dev fails with tunnelto (but vite preview works) #76

Open
opened 2026-03-02 23:02:11 +03:00 by kerem · 2 comments
Owner

Originally created by @dhbradshaw on GitHub (Oct 12, 2023).
Original GitHub issue: https://github.com/agrinman/tunnelto/issues/85

Problem

Not sure why, but vite dev fails with tunnelto.

vite dev is a live server for js front ends that isn't compiled into an artifact but updates as code is saved.

Current Workaround

Something that I've found to work instead is vite preview, which won't change as you save, but will work for tunnelto.

Just using a basic server to serve the build folder (actually the dist folder in the vite case by default) also fails in my case because the api proxy that the vite live server uses doesn't come on by default.

vite preview allows you to serve from the artifact in a way that works for tunnelto and also access the api as though you were using a live build.

Originally created by @dhbradshaw on GitHub (Oct 12, 2023). Original GitHub issue: https://github.com/agrinman/tunnelto/issues/85 ## Problem Not sure why, but `vite dev` fails with `tunnelto`. `vite dev` is a live server for js front ends that isn't compiled into an artifact but updates as code is saved. ## Current Workaround Something that I've found to work instead is `vite preview`, which won't change as you save, but will work for `tunnelto`. Just using a basic server to serve the `build` folder (actually the `dist` folder in the vite case by default) also fails in my case because the api proxy that the vite live server uses doesn't come on by default. `vite preview` allows you to serve from the artifact in a way that works for tunnelto and also access the api as though you were using a live build.
Author
Owner

@MikeSpock commented on GitHub (Jan 30, 2024):

I am having the same issue. Rather annoying, as this breaks Vite's hot reload feature. Any suggestion how to fix this?

<!-- gh-comment-id:1916954343 --> @MikeSpock commented on GitHub (Jan 30, 2024): I am having the same issue. Rather annoying, as this breaks Vite's hot reload feature. Any suggestion how to fix this?
Author
Owner

@DFanso commented on GitHub (Dec 26, 2025):

Did u try vite dev --host

<!-- gh-comment-id:3692943647 --> @DFanso commented on GitHub (Dec 26, 2025): Did u try vite dev --host
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tunnelto#76
No description provided.