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

more file ops support. eg.add/revome... #126

Closed
underfin opened this issue May 11, 2020 · 2 comments
Closed

more file ops support. eg.add/revome... #126

underfin opened this issue May 11, 2020 · 2 comments

Comments

@underfin
Copy link
Member

underfin commented May 11, 2020

Hmr only watch file change,not watch other file ops.It is necessary for hmr.

@yyx990803
Copy link
Member

yyx990803 commented May 14, 2020

A new file created is typically empty, triggering updates for this doesn't really mean much. Triggering update on file removal has a good chance of instantly cause an error, so it's better for the user to manually reload in this case.

Open for suggestions if we have more concrete cases where such updates are needed.

@underfin
Copy link
Member Author

underfin commented May 14, 2020

Thanks your explaination.I am sorry with I don't say my idea clearly.

For the sence of add file,eg. a.vue add an new import with b.ts.hmr update will be throw error with b.ts not found.The error should be disappear after we add b.ts.

For the sence of delete file.The user don`t get error on now.Because the deleted file isn't be watced with delete event and isn't trrigger hmr. Actuary, the user need judge this sence with why the deleted sth. is still on page.Reload will be correct way for the user.Maybe we can watch delete file and trrigger hmr with reload, it can let user to saw the error instead of they judgement slef.For the best hmr, the deleted file may be isn't import by the app,it is import someone of component,should not reload whole page.so this is maybe need some work todo.

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

No branches or pull requests

2 participants