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

Circular imports bring a poor experience to users #14975

Closed
7 tasks done
newives opened this issue Nov 13, 2023 · 2 comments
Closed
7 tasks done

Circular imports bring a poor experience to users #14975

newives opened this issue Nov 13, 2023 · 2 comments

Comments

@newives
Copy link

newives commented Nov 13, 2023

Describe the bug

For example, if you introduce a tool function into the .vue file in some places, the modified page will be refreshed immediately after the call. The experience is too bad, and there is no problem with this usage.

This may be a blow to many projects 😭

Reproduction

none

Steps to reproduce

No response

System Info

vite5.0.0-beta.18

Used Package Manager

pnpm

Logs

No response

Validations

@newives
Copy link
Author

newives commented Nov 13, 2023

Modifying any content in the template or script tag in the .vue file will trigger reloading, but modifying the style will not trigger it.

@bluwy
Copy link
Member

bluwy commented Nov 13, 2023

Duplicate of #10208. In Vite 5, Vite will try its best to avoid circular imports when possible. There are cases where we can't apply HMR without the risk of breaking your app due to circular execution order, it's documented at https://main.vitejs.dev/guide/troubleshooting.html#a-full-reload-happens-instead-of-hmr. Ideally you should avoid it if possible.

@bluwy bluwy closed this as not planned Won't fix, can't repro, duplicate, stale Nov 13, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Nov 28, 2023
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