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

feat: allow configuration of the vite HMR server #28517

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Sep 27, 2024

  1. feat: allow configuration of the vite HMR server

    Vite allows additional configuration options for the HMR server that let the user set the port, protocol and host etc. of the HMR server.
    
    Whilst running a local Angular application with browserstack a websocket error gets thrown when the application and the HMR are being served on the same port `client:529 WebSocket connection to 'ws://localhost:4200/' failed: Unrecognized frame opcode: 5`. This results in the vite client force reloading the page https://github.com/vitejs/vite/blob/eb08f605ddadef99a5d68f55de143e3e47c91618/packages/vite/src/client/client.ts#L106-L108
    
    Configuring HMR server to run on a different port to the main application fixes the issue
    RGunning committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    4196a30 View commit details
    Browse the repository at this point in the history