Skip to content

vite build --watch HMR #3873

@oscartbeaumont

Description

@oscartbeaumont

Clear and concise description of the problem

My current setup involves using the vite build --watch command so that I am able to serve my Vite frontend from a custom webserver. It would be great if hot module reloading could be used in this configuration.

This feature is supported by Snowpack via the command snowpack build --watch. --hmr.

Suggested solution

The HMR server could still be served on a port controlled by Vite and the HMR code could still be included in the outputted files. This way the HMR would work even though the frontend files were served with another webserver.

I am new to Vite's codebase but with some pointers about where to start would be happy to attempt a PR.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    P2 - 2

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions