Skip to content

Unix socket listening support #674

@findoff

Description

@findoff

Is your feature request related to a problem? Please describe.
I like dev on my VPS with auto subdomains by nginx and unix sockets (any subdomain resolves as static in /projects/NAME/static and not existing files proxied to socket)

Describe the solution you'd like
Add socket option to listen on a unix socket instead of port, like webpack devServer.socket.

Additional context
Now i can specify socket with vite.config.js port, and socket work, but i got error with browser because vite don't know about sockets and sub-situate value into client code instead of get it from location...

// Uncaught SyntaxError: Invalid regular expression flags (client.js:23)
const socketUrl = `${socketProtocol}://${location.hostname}:${/srv/sockets/vue3-vite-test.sock}`;

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions