We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
3.4.21
https://stackblitz.com/edit/vitejs-vite-lsy8bk?file=src%2FApp.vue,src%2Fcomponents%2FHelloWorld.vue,src%2Fcomponents%2Ftypes.ts,package.json&terminal=dev
该问题只出现在 lang="tsx" 的情况,在保存代码进行热更新时抛出错误。
热更新不会抛出错误
热更新抛出错误
No response
The text was updated successfully, but these errors were encountered:
Workaround: const props = defineProps<Props,>() https://stackoverflow.com/a/32697733/2302258
const props = defineProps<Props,>()
热更新出错是合理的,不过可能需要看一下为什么初次加载时没出错。
Sorry, something went wrong.
Workaround: const props = defineProps<Props,>() https://stackoverflow.com/a/32697733/2302258 热更新出错是合理的,不过可能需要看一下为什么初次加载时没出错。
你给的链接中的情况和这里的情况并不一样,链接中提到的是在 tsx 中定义一个泛型时出现报错的原因和解决方法。 这里定义了一个泛型 T1. 但是在使用时是不会报错的:
// 定义时需要通过 extends 或者 comma 的方式解决 const f = <T extends any>(a: T) => a // 使用时,解析器能正确识别是标签还是泛型 const a = f<string>('1') console.log('a:', a)
这是我在自己项目中随意定义的一个函数后调用该函数,并没有任何问题
所以这里热更新失败本身就有问题
不好意思,是我看错了。我再仔细研究一下。
还有一个问题,setup tsx 的方式封装组件,热更新会很慢(控制台没有输出热更新,或者很久才会输出热更新成功)。需要手动刷新浏览器,且重新加载的过程十分缓慢(就好像是所有缓存被清理,需要重新加载所有依赖的并缓存一样),大多需要重新启动项目才能正常使用
No branches or pull requests
Vue version
3.4.21
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-lsy8bk?file=src%2FApp.vue,src%2Fcomponents%2FHelloWorld.vue,src%2Fcomponents%2Ftypes.ts,package.json&terminal=dev
Steps to reproduce
该问题只出现在 lang="tsx" 的情况,在保存代码进行热更新时抛出错误。
What is expected?
热更新不会抛出错误
What is actually happening?
热更新抛出错误
System Info
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: