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
withDefaults' first argument must be a defineProps call. #635
Comments
嗨,@huxinhai!又见面了,希望一切都好。 The error "withDefaults' first argument must be a defineProps call" occurs because the To resolve this issue, you can try the following approaches:
Remember, HMR issues can be tricky to diagnose and resolve due to their dynamic nature and dependency on the development environment's specific configuration and versions of tools and libraries. The From the given code snippet, it's evident that For more details, you can refer to the withDefaults usage in the vue-macros test fixtures. I also found a similar closed issue withDefaults can only be used with type-based defineProps declaration which might be related to your problem. This issue was closed by a commit: fix(reactivity-transform): support runtime-based defineProps on May 16, 2023. You might want to check if this commit is included in your current version of vue-macros. Sources
|
我这边如果不使用with 而使用assert的情况下会提示assert已废弃 让我使用with |
Confirmed it's a bug. |
Then if you have repaired it, could you please reply to me so that I can update it |
Describe the bug
使用definePropsRefs的时候在第一次的时候是没有问题的,但是修改了里面的内容触发了vite的热更新的时候会出现withDefaults' first argument must be a defineProps call.
但是我重新是刷新这个界面的时候又好了,但是重新修改内容还是会出现这个问题 我尝试了四台电脑都是这样的问题
Reproduction
https://github.com/huxinhai/vue-macros-main
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: