Subscribe on changes!

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

avatar
May 11th 2020

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

avatar
May 14th 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.

avatar
May 14th 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.