feat: support `.test` domains for local dev
Author: itzzjustmateoCreated Sep 15, 2026Updated Sep 17, 2026
Labelspending triage
Description
Many local development tools expose projects on .test domains instead of localhost. One example is Lerd, which serves projects as my-app.test.
It would be nice if Vite had first-class support for .test domains during development, making local development feel closer to a real production environment.
Suggested solution
Add a simple option in the Vite config to automatically expose the dev server on projectName.test (or another configurable .test domain), instead of only using localhost.
Example:
export default defineConfig({
server: {
localDomain: {
enabled: true,
domain: "my-app.test",
},
},
})
Which would expose the project at:
https://my-app.test
Additional context
Lerd is a good example of this workflow on Linux for PHP/Laravel projects, and it's a very nice developer experience when working with Vite.
Source: vitejs/vite