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

Vite HMR circular dependancies #309

Closed
demyte opened this issue Feb 13, 2024 · 1 comment
Closed

Vite HMR circular dependancies #309

demyte opened this issue Feb 13, 2024 · 1 comment

Comments

@demyte
Copy link

demyte commented Feb 13, 2024

Hi there,

With vite 5.x, I am getting circular imports with this plugin on any page I use useRouter() or useRoute()

For example:

 vite:hmr [file change] src/components/AddinFooter.vue +4s
  vite:hmr [vue:update(template)] D:/xpna/main/src/xpna.addin.client/src/components/AddinFooter.vue +10m
  vite:hmr circular imports detected: /src/components/AddinFooter.vue -> virtual:vue-router/auto -> virtual:vue-router/auto/routes -> /src/pages/addin.vue -> /src/components/AddinFooter.vue +19ms
6:21:46 pm [vite] page reload src/components/AddinFooter.vue (circular imports)

Is there anyway to stop this happening as at dev time its causing page reloads instead of HMR updates?

In my vite.config plugins I am using

VueRouter:

import VueRouter from 'unplugin-vue-router/vite'
....
plugins: [
  VueRouter({})
...
]
....

AutoImports:

import { VueRouterAutoImports } from 'unplugin-vue-router'
....
plugins: [
  AutoImport({
    imports: [VueRouterAutoImports]
  }),
...
]
....
@posva
Copy link
Owner

posva commented Feb 13, 2024

Duplicate of #132

@posva posva marked this as a duplicate of #132 Feb 13, 2024
@posva posva closed this as not planned Won't fix, can't repro, duplicate, stale Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants