-
Notifications
You must be signed in to change notification settings - Fork 277
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
bug: 通过create-umi构建的Umi Plugin工程build时生成d.ts文件失败 #746
Comments
这个问题在这一行日志: error - TS5055: Cannot write file 'F:/JavaScript/umi-plugin-test/dist/cjs/index.js' because it would overwrite input file. 发现貌似是重复写了这个 js 产物文件,原因我没有细查,但添加 tsconfig 的 include 范围后可以正常构建了: "include": ["src"] @PeachScript 有时间了可以辛苦看下这个是什么原因,现在 father 必须要添加 include 吗,entry 默认是 |
你好问题有修复吗,build的时候还是有遇到相似的问题 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
4.4.0
OS Version
Windows 11 23H2
Node.js Version
v18.16.1
Link to minimal reproduction
https://github.com/kukushouhou/umi-plugin-test
Steps to reproduce
通过脚手架直接生成工程后编译就能复现错误,以下是日志
What is expected?
预期是能正常输出.d.ts文件.
What is actually happening?
实际输出.d.ts文件时报"cjs/index.js"文件已存在的错误
Any additional comments? (optional)
我尝试Debug找问题没找到.
我尝试把断点打到getDeclarations方法上,然后编译中断时把"cjs/index.js"文件删除后继续执行,就能正常编译出"cjs/index.d.ts"文件.
感觉应该是判断文件是否存在的方法传参传错了,但我没找到这个方法具体在哪里
试过降级到v4.3.8和v4.3.7问题依然存在,也在MacOS下尝试过问题一致
The text was updated successfully, but these errors were encountered: