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
<script setup lang="tsx"> 在热更新时抛出错误 #10681
Comments
Workaround: 热更新出错是合理的,不过可能需要看一下为什么初次加载时没出错。 |
你给的链接中的情况和这里的情况并不一样,链接中提到的是在 tsx 中定义一个泛型时出现报错的原因和解决方法。 // 定义时需要通过 extends 或者 comma 的方式解决
const f = <T extends any>(a: T) => a
// 使用时,解析器能正确识别是标签还是泛型
const a = f<string>('1')
console.log('a:', a)
所以这里热更新失败本身就有问题 |
不好意思,是我看错了。我再仔细研究一下。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: