Skip to content

2.9.1 portsAreCompatible is a breaking change #7545

@jeoy

Description

@jeoy

Describe the bug

const wsServer = hmrServer || (portsAreCompatible && server)

When access dev server from domain(www.mydomain.com) not localhost:xxxx, websocket always connect failed.

And It works in v2.8.6

my vite config


  server: {
        hmr: {
            port: 80,
        },
    },

I highly recommended Revert this PR #7282

Reproduction

Critical bug

System Info

System:
    OS: macOS 10.15.7
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 113.89 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 16.14.0 - ~/.nvm/versions/node/v16.14.0/bin/node
    Yarn: 1.22.17 - ~/.nvm/versions/node/v16.14.0/bin/yarn
    npm: 8.3.1 - ~/.nvm/versions/node/v16.14.0/bin/npm

Used Package Manager

yarn

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    p2-edge-caseBug, but has workaround or limited in scope (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions