Skip to content

ProxyTargetDetailed typing requires host/port even when using socketPath (Unix socket) #46

@ooopus

Description

@ooopus

Problem

When using Vite dev server proxy with a Unix domain socket, I want to set:
target: { socketPath: "/path/to/backend.sock" }

But TypeScript typing for ProxyTargetDetailed requires host and port, so { socketPath } alone fails type-checking.

Expected

Allow a Unix socket target without requiring host/port. In Node.js HTTP request options, socketPath is meant to be used as an alternative to host:port ("use one of host:port or socketPath"). This is a mutually exclusive choice.

Actual

TypeScript reports that host and port are missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions