Skip to content

HMR is not working when import a WebComponent #644

@ricardo17coelho

Description

@ricardo17coelho

Describe the bug

If i import a webcomponent in my app like this:

import '@package/webcomponent'

vite config

      template: {
        compilerOptions: {
          isCustomElement: (tag) => tag === 'webcomponent',
        },
        transformAssetUrls,
      },

in the console i see this log:

vite] hot updated: /src/components/products/ProductCardHero.vue

But nothing changes in the UI.
I need to full reload the page to see the changes.

Reproduction

https://stackblitz.com/edit/vite-6sy6zhbh?file=src%2FApp.vue

Steps to reproduce

No response

System Info

"vue": "3.5.18",
    "vite": "7.0.6",
    "vuetify": "3.9.4"

Used Package Manager

yarn

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    feat: hmrp3-minor-bug 🔨An edge case that only affects very specific usage (priority)

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions