core icon indicating copy to clipboard operation
core copied to clipboard

fix(hmr):using customElements after hmr will trigger an error

Open ysy945 opened this issue 3 years ago • 2 comments

  • problem link
  • when I use customElements it's ok. but after changing file will trigger hmr.,it will be rerun window.customElements.define. so there is an error will be caused. image
  • I think just need to set a cache to check that customElement has been registered or not.

ysy945 avatar Oct 27 '22 12:10 ysy945

@sxzz Excuse me, do you have time to review this pr. thanks

ysy945 avatar Oct 30 '22 02:10 ysy945

I think this is outside the scope of vue. the developers should ensure that custom elements are not registered many times. Playground

edison1105 avatar Sep 09 '24 10:09 edison1105