Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vite HMR port configuration is no longer honored #13374

Closed
pierres opened this issue Feb 11, 2022 · 1 comment · Fixed by nuxt/framework#3190
Closed

Vite HMR port configuration is no longer honored #13374

pierres opened this issue Feb 11, 2022 · 1 comment · Fixed by nuxt/framework#3190

Comments

@pierres
Copy link

pierres commented Feb 11, 2022

Environment

  • nuxt3 3.0.0-27408580.aece351
  • using Node 17 within a Docker container

Reproduction

Configure the Vite HMR port via nuxt.config.ts

    vite: {
        server: {
            hmr: {
                port: 9001,
                clientPort: 9001
            }
        }
    }

Describe the bug

Vite will still use the default port 24678 for the web socket connection. This used to work in previous Nuxt3 version. My assumption is that the following commit introduced this bug: https://github.com/nuxt/framework/pull/3169/files

Additional context

No response

Logs

No response

@misaon
Copy link
Contributor

misaon commented Feb 11, 2022

@antfu Is clientPort defined in defineNuxtConfig > vite > server > hmr respected at all? After updating to version 3.0.0-27408529.089160a the page started reloading because it cannot connect to HMR. We have a rule in reverse proxy for websocket where there is a fixed port. If it is to be dynamic, we cannot reasonably use Docker for local development !

Buggy MR nuxt/framework#3169

@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants