-
Notifications
You must be signed in to change notification settings - Fork 114
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
Vite+Vue3项目配置了type依旧在运行和打包时报错 #116
Comments
在它的源package.json文件中,exports字段新增下面代码 "./client": {
"types": "./client.d.ts"
} |
@YiMo1 所以说要改源码? |
看样子这个项目已经停止维护了,如果你是多设备或者多人协同工作的话,可以通过修改源码并打补丁的方式去解决这个问题。 你也可以在issue中寻找其他和你一样的问题的人,看看他们有没有fork此仓库并作出修改的版本且发布到了npm上,如果有的话,你可以使用其他人的npm包。 |
我也刚碰到这个问题 |
如果是面向浏览器的项目的话,moduleResolution一般是Bundler而不是node,为了解决这个问题而修改这个属性可能会导致其它意想不到的错误,并不推荐。 |
type配置:
main.ts引入时报错,但是不影响运行:
打包时报错导致打包失败:
The text was updated successfully, but these errors were encountered: