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

Always watch file changes even HMR is disabled #1503

Closed
3 tasks done
AlexandreBonaventure opened this issue Jan 12, 2021 · 3 comments · Fixed by #1504
Closed
3 tasks done

Always watch file changes even HMR is disabled #1503

AlexandreBonaventure opened this issue Jan 12, 2021 · 3 comments · Fixed by #1504

Comments

@AlexandreBonaventure
Copy link
Contributor

⚠️ 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.

Describe the bug

Disabling HMR with server.hmr: false is not invalidating cache on file change.
I would expect that when hmr is disabled we should still be able to pick up the changes upon browser refresh.

Reproduction

https://github.com/AlexandreBonaventure/vite-hmr-disabled-bug

  1. Run dev server
  2. Change something in app.vue
  3. Refresh page and notice it did nothing

System Info

  • vite version: 2.0.0.beta-23
  • Operating System: Mac OS
  • Node version: 14.2
  • Package manager (npm/yarn/pnpm) and version: yarn v1
@AlexandreBonaventure
Copy link
Contributor Author

Worth noting that it could be relevant to #1273 and #1434. Since if you are able to run vite dev --mode production + server.hmr: false that's a good alternative to setup environment for writing e2e tests in development

@jonlepage
Copy link

jonlepage commented Apr 20, 2021

in nwjs or electron app , it possible to need to disable hmr for any reason.
but server.hmr: false should also watch file change and allow applications restart !
Can we reopen this ? @yyx990803

@patak-dev
Copy link
Member

Please create a new issue so we can properly track this request

@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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants