[Need Help] got declare const _default: any; export default _default;
when build vue files
#277
Closed
3 tasks done
Labels
enhancement
New feature or request
Describe the bug
env:
@vitejs/plugin-vue2: ^2.2.0 => 2.2.0
@vitejs/plugin-vue2-jsx: ^1.1.0 => 1.1.0
vite: ^4.4.9 => 4.4.9
vite-plugin-dts: ^3.6.0 => 3.6.0
vue: 2.7.14
unplugin-vue-macros: ^2.5.1
在尝试使用此插件构建vue组件时,发现导出的d.ts如下,丢失类型信息。
I got invalid d.ts like below when try to build vue components with vite-plugin-dts
后续使用debug工具打断点,发现在此处
service.getEmitOutput()
的返回值已经不对同时未进入时
sourceFile.text
值如下,具有类型信息After I use break points, I found the output of the function call
service.getEmitOutput()
has already become invalid hereAlso I checked the value of
sourceFile.text
(listed below) and I found it has types info.vue-tsc命令行可以得到类型信息
the d.ts can be exported properly by
vue-tsc
cli目前猜测是tsconfig配置不正确,希望能够提供帮助, 谢谢
I guess this is caused by wrong tsconfig, but I don't know how to solve it, I need your help
Reproduction
https://stackblitz.com/edit/vitejs-vite-f5wcx4
Steps to reproduce
cd internal/build pnpm build
System Info
Validations
The text was updated successfully, but these errors were encountered: