Subscribe on changes!

Modifying a property does not trigger HMR

avatar
Apr 13th 2021

Version

3.0.11

Reproduction link

https://github.com/CHOYSEN/vue-hmr-issue

Steps to reproduce

Modify the placeholders of two el-input components in App.vue

What is expected?

The placeholders of two el-input components have been modified correctly

What is actually happening?

The el-input component within the el-main component has not been modified

avatar
Apr 13th 2021

I'm not sure if it was the HMR, because from the response it worked.

If I modify the placeholders of these two components:

import { createHotContext as __vite__createHotContext } from "/@vite/client";import.meta.hot = __vite__createHotContext("/src/App.vue");const _sfc_main = {}
import { resolveComponent as _resolveComponent, createVNode as _createVNode, withCtx as _withCtx, Fragment as _Fragment, openBlock as _openBlock, createBlock as _createBlock } from "/node_modules/.vite/vue.js?v=fccc817f"

function _sfc_render(_ctx, _cache) {
  const _component_el_input = _resolveComponent("el-input")
  const _component_el_main = _resolveComponent("el-main")

  return (_openBlock(), _createBlock(_Fragment, null, [
    _createVNode(_component_el_input, { placeholder: "hey!" }),
    _createVNode(_component_el_main, null, {
      default: _withCtx(() => [
        _createVNode(_component_el_input, { placeholder: "hey!" })
      ]),
      _: 1 /* STABLE */
    })
  ], 64 /* STABLE_FRAGMENT */))
}


_sfc_main.render = _sfc_render
_sfc_main.__file = "C:/Users/CHOYSEN/Desktop/vite-hmr-issue/src/App.vue"
export default _sfc_main
_sfc_main.__hmrId = "7ba5bd90"
typeof __VUE_HMR_RUNTIME__ !== 'undefined' && __VUE_HMR_RUNTIME__.createRecord(_sfc_main.__hmrId, _sfc_main)
export const _rerender_only = true
import.meta.hot.accept(({ default: updated, _rerender_only }) => {
  if (_rerender_only) {
    __VUE_HMR_RUNTIME__.rerender(updated.__hmrId, updated.render)
  } else {
    __VUE_HMR_RUNTIME__.reload(updated.__hmrId, updated)
  }
})

无标题

avatar
Apr 13th 2021

Please open an issue in element-plus first. Read https://new-issue.vuejs.org/?repo=vuejs/vue#why-repro and open an issue here if you reproduce it without element-plus

avatar
Apr 13th 2021

@CHOYSEN I tried your repo and everything works fine.

avatar
Apr 14th 2021

@edison1105

It may cause by element-plus. I'm not sure.

123

avatar
Jun 25th 2021

@edison1105

It may cause by element-plus. I'm not sure.

123

i have the problem too