Skip to content

HMR does not work with class-components loaded in the router #521

Closed
@Evertvdw

Description

@Evertvdw

Hello there, there seems to be a HMR issue when using vue-class-components in Vue3. It seems to have to do with components that are loaded in the routes. I created a codesandbox to reproduce this issue:

https://codesandbox.io/s/fervent-haibt-htft9?file=/src/App.vue

In the 'App.vue' I created a class component in which HMR does work, try changing the text and you see it updated on the screen.
In Index.vue which is put into a router-view in the routes.js file, HMR works when you use the old options syntax, but when you use the class syntax the HMR does not work anymore.

This is of course not a very nice developer experience, can this be fixed?

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