Skip to content

Files that are not pure Preact component exporters shouldn't create an HMR boundary #561

@tommie

Description

@tommie

I'm using Vite, but I think this applies to all backends.

A file that has "other stuff" than Preact components must let HMR reload the page, e.g. by not calling accept at all, or calling invalidate.

The Vite React Refresh plugin checks that all exports are components, and ignores the HMR request if there are non-components: vitejs/vite-plugin-react-refresh@feec176

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions