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

List the detected circular imports in the console #15670

Closed
4 tasks done
oom- opened this issue Jan 21, 2024 · 1 comment
Closed
4 tasks done

List the detected circular imports in the console #15670

oom- opened this issue Jan 21, 2024 · 1 comment

Comments

@oom-
Copy link

oom- commented Jan 21, 2024

Description

I'm meeting an issue with circular imports while using "import type" declaration.
Vite does detect the circular imports and reload the whole page:
12:37:21 [vite] page reload src/components/billing/BillingList.vue (circular imports) (x2)

But where are the circular imports ? Vite is not enough verbose.

Suggested solution

Make vue logs more verbose and display the circular imports that was detected:

12:37:21 [vite] page reload src/components/billing/BillingList.vue (circular imports) (x2)
BillingList.vue > apitypes.ts > userStore.ts > apitype.ts

Alternative

Waiting on madge to support vuejs files: pahen/madge#122
(still pending since 2017)

Additional context

No response

Validations

@sapphi-red
Copy link
Member

You can use vite --debug hmr.
See https://vitejs.dev/guide/troubleshooting.html#a-full-reload-happens-instead-of-hmr for more details.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants