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

HMR: change or unlink SFC file not be rendered in time #2128

Closed
2 of 3 tasks
HomyeeKing opened this issue Feb 20, 2021 · 0 comments · Fixed by #2142
Closed
2 of 3 tasks

HMR: change or unlink SFC file not be rendered in time #2128

HomyeeKing opened this issue Feb 20, 2021 · 0 comments · Fixed by #2142

Comments

@HomyeeKing
Copy link
Contributor

HomyeeKing commented Feb 20, 2021

⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.

  • Read the docs.
  • Use Vite >=2.0. (1.x is no longer supported)
  • If the issue is related to 1.x -> 2.0 upgrade, read the Migration Guide first.

Reproduction

  • clone this vite project
  • do yarn then yarn dev
  • start the project and see a text 111 from Test.vue
  • empty the Test.vue
  • '111' still on the page , the browser doesn't react for this until you refresh the page
  • or delete the Test.vue
  • even if refresh the page, the 111 still on page util you perform save (ctrl + s) in App.vue then refresh

I think we should destroy the moduleGraph in watch unlink and let browser fetch the file which import the Test.vue again and at least give some warning in time when .vue file is empty for missing template or render function.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant