Skip to content

feat: support .test domains for local dev #23492

Description

@itzzjustmateo

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.

Activity

  1. changed the title [-]Support `.test` domains for local development[/-] [+]feat: support `.test` domains for local dev[/+] on Sep 15, 2026
  2. itzzjustmateo commented on Sep 15, 2026

    @itzzjustmateo
    Author

    ``

    ??

  3. btea commented on Sep 16, 2026

    @btea
    Contributor

    #19250 seems to be related to this.

  4. itzzjustmateo commented on Sep 16, 2026

    @itzzjustmateo
    Author

    #19250 seems to be related to this.

    I am not sure, could be 🤷

  5. bluwy commented on Sep 17, 2026

    @bluwy
    Member

    Personally I think we can try supporting this builtin, but I don't think we necessarily have to restrict this to the .test tld, but any domain specified through the option.

    This was also brought up in our ecosystem channel. https://portless.sh is a similar tool we can reference or use.

  6. itzzjustmateo commented on Sep 17, 2026

    @itzzjustmateo
    Author

    Personally I think we can try supporting this builtin, but I don't think we necessarily have to restrict this to the .test tld, but any domain specified through the option.

    This was also brought up in our ecosystem channel. https://portless.sh is a similar tool we can reference or use.

    this "portless" tool actually sounds pretty interesting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions