Skip to content

export the portΒ #3719

Open
Open
@PanJiaChen

Description

@PanJiaChen

What problem does this feature solve?

In most cases, the port is our user-defined port.
But sometimes users will start multiple services. At this time vue-cli will use portfinder to start a new port, but the port is not exposed.

proxy: {
 target: `http://localhost:${port}/mock`,
}

Since the port has changed, the request cannot be proxy correctly.

What does the proposed API look like?

process.env.VUE_CLI.port
Or any other way

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