feat: add ability to set HMR port#27326
Conversation
|
|
|
I think the Vite port is being overridden here to be the same as the Nuxt default port: https://github.com/nuxt/cli/blob/998634212df0a564a6c5ba1ddbe40d5870a74d77/src/utils/dev.ts#L189-L208 cc: @pi0 |
|
@danielroe You seem to be right. However it seems that I can try to follow up with a PR to @nuxt/cli repo as well and try to fix that, but it seems that this PR might still be required. In the meantime I fixed some typing issues and ensured that it first attempts to bind to the port in the config. |
|
Opened a PR to nuxt/cli - we can then update this PR to check if I would also avoid changing the schema in this case. |
🔗 Linked issue
resolves #27325
📚 Description
Adds an ability to set the HMR port by setting
vite.server.hmr.portinnuxt.config.ts. This solves the problem of running HMR on environments with firewalls and/or limited port range assigned to user(s).