Subscribe on changes!

HMR doesn't work when changing Events Validation's return value

avatar
Apr 26th 2023

Vue version

3.2.47

Link to minimal reproduction

https://github.com/LoTwT/vue-events-validation-issue

Steps to reproduce

  • change the return value of the event submit() in defineEmits in Comp.vue
  • click the Comp Button and see the warn in browser console

What is expected?

The warn should output correctly after the return value of the event changed without refresh.

What is actually happening?

The warn always outputs after the return value changed from false to true. It will be correct after refreshing.

Also, the defineProps has the same issue.

System Info

System:
    OS: macOS 13.2.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 1.92 GB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.16.0 - ~/Library/Caches/fnm_multishells/30812_1682494754994/bin/node
    npm: 9.5.1 - ~/Library/Caches/fnm_multishells/30812_1682494754994/bin/npm
  Browsers:
    Chrome: 112.0.5615.137
    Firefox: 106.0.5
    Safari: 16.3
  npmPackages:
    vue: ^3.2.47 => 3.2.47

Any additional comments?

No response