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

Failed to resolve import "ant-design-vue/es/layout/style/css" from "src\components\HelloWorld.vue". Does the file exist? #124

Closed
B1ackg0d opened this issue Nov 24, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@B1ackg0d
Copy link

B1ackg0d commented Nov 24, 2023

靓仔你好,尝试在项目中引入ant-design-vue这个库,pnpm install ant-design-vue。使用的时候报错了。按照文档应该是安装完依赖会自动引入?
image

@markthree
Copy link
Member

markthree commented Nov 24, 2023

@B1ackg0d 靓仔,我看了下配置,可以在 presets/index.ts 中补上 importStyle: false

image

@markthree markthree self-assigned this Nov 24, 2023
@markthree markthree added the bug Something isn't working label Nov 24, 2023
@markthree
Copy link
Member

@B1ackg0d 已修复 → 44290d8

@B1ackg0d
Copy link
Author

B1ackg0d commented Nov 24, 2023

@B1ackg0d 已修复 → 44290d8

@markthree 靓仔,按照你的操作。这个报错已经解决。我尝试引入antd的全局暗色样式,这个样式是存在的
image
报错了:
Failed to resolve import "ant-design-vue/dist/antd.dark.css" from "src\main.ts". Does the file exist?

@markthree
Copy link
Member

markthree commented Nov 24, 2023

@B1ackg0d 靓仔,我并不是特别了解 antd 的具体内容哦,也不是特别清楚它的包有没有导出 ant-design-vue/dist/antd.dark.css,我认为你可以根据它的最新的文档来处理这个样式 🥰

tip: 非模板问题

@B1ackg0d
Copy link
Author

@B1ackg0d 靓仔,我并不是特别了解 antd 的具体内容哦,也不是特别清楚它的包有没有导出 ant-design-vue/dist/antd.dark.css,我认为你可以根据它的最新的文档来处理这个样式 🥰

tip: 非模板问题

好的靓仔,谢谢你

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants