Skip to content
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

升级1.1.4后,在vue3使用是没有问题的。但打包就失败了。 #842

Open
hanlei233 opened this issue Aug 8, 2024 · 6 comments

Comments

@hanlei233
Copy link

hanlei233 commented Aug 8, 2024

图片
辛苦大神再好好改一波。谢谢。

@hanlei233
Copy link
Author

我看,更新1.1.3,和1.1.4都是解决TS的编译问题,但问题貌似没有解决掉。

@xyxiao001
Copy link
Owner

declare module '*.vue' { import { Component, DefineComponent } from 'vue' const component: DefineComponent<{}, {}, Component> export default component }
可以先配置下.d.ts文件

@hanlei233
Copy link
Author

修改.d.ts文件还是不行。。。
图片
打包还是失败。
图片

@xyxiao001
Copy link
Owner

image
这样配置的嘛,测试是可以的

@hanlei233
Copy link
Author

同志们:
在src目录下,创建:vite-env.d.ts
并写:
declare module '*.vue' { import { Component, DefineComponent } from 'vue' const component: DefineComponent<{}, {}, Component> export default component }
就可以打包成功了。
感谢大神指导。

@wangyuewen
Copy link

还是有问题啊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants