You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Vite does not know which domain will be used to access the development server, we need a way to explicitly provide this information to Vite.
To specify which URL to open when Vite starts, we can currently use the server.open option.
However, there is currently no way to control which URL is displayed in Vite's logs. This is the functionality we are missing.
Suggested solution
The solution suggested in #10994 is enough for this use case.
vite.config.ts
import{defineConfig}from'vite'exportdefaultdefineConfig({// ...server: {// these URLs will be printed as "key: value", line by lineprintedUrls: {// override vite resolved URL for locallocal: 'https://example.development.domain.com',// explicitly hide vite resolved URL for networknetwork: false,// perhaps we can allow specifying more URLs ?"another-network": 'https://url.for.another.network.com'}}})
Description
This issue follows #10994. We have a slightly different use case but also require the ability to configure the URLs displayed in logs.
We are running the Vite development server behind a locally running reverse proxy. To access the development server, we use the following setup:
https://example.development.domain.com (reverse proxy) → localhost:5173 (Vite dev server)
Since Vite does not know which domain will be used to access the development server, we need a way to explicitly provide this information to Vite.
To specify which URL to open when Vite starts, we can currently use the server.open option.
However, there is currently no way to control which URL is displayed in Vite's logs. This is the functionality we are missing.
Suggested solution
The solution suggested in #10994 is enough for this use case.
vite.config.ts
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: