vue-loader icon indicating copy to clipboard operation
vue-loader copied to clipboard

HMR with "webpack serve --hot" works only on first change of .vue files

Open dsine-de opened this issue 4 years ago • 2 comments

Version

16.0.0-rc.2

Reproduction link

https://github.com/dsine-de/vue3-webpack5

Steps to reproduce

  1. Clone Github Repository
  2. "npm i" (with Node.js 14.x installed)
  3. "npm run dev1"
  4. Open http://localhost:8080/ in browser
  5. Edit "src/vue/app.vue" - e.g. change the console.log message "created" to "created 1"
  6. See the changes in the browser console log ("created 1")
  7. Edit "src/vue/app.vue" again (e.g. "created 2")
  8. See browser log - either "Nothing updated" or no log message after "App updating..."

What is expected?

Second time changes in .vue files after starting "webpack serve --hot" should be hot reloaded in the browser.

What is actually happening?

Only the first change in .vue files is hot reloaded.


Changing "src/js/index.js" file works even on subsequent changes (although with a full reload - which is probably expected because it's the webpack entry / Vue.js root).

dsine-de avatar Nov 24 '20 12:11 dsine-de

"vue-loader": "^15.9.6" Webpack5 does not appear to be supported

[HMR] Checking for updates on the server...

takhello avatar Jan 26 '21 10:01 takhello

I have the same issue with version "16.8.1", webpack 5 and vuejs 3. Any workaround?

jmn90 avatar Oct 13 '21 13:10 jmn90