unplugin/unplugin-vue2-script-setup

Property 'addCount' does not exist on type '{}'.ts(2339)

syymo opened this issue · 5 comments

syymo commented

自己 搭建环境 和 使用 https://github.com/antfu/unplugin-vue2-script-setup/tree/main/playground 都会出现同样问题

image

+1

看看 7da9502 是不是解决你们的问题了。

感谢

感谢,就是修改下tsconfig.json
"vueCompilerOptions": { "target": 2, },

The solution by @WaynePluto works.

That's because experimentalCompatMode has been deprecated, so target must be used instead.

The Support Vue 2 template section on the doc should be updated accordingly.

Best!