Skip to content

Error when import css #5169

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

Closed
1 task done
smallp opened this issue Jan 15, 2022 · 5 comments
Closed
1 task done

Error when import css #5169

smallp opened this issue Jan 15, 2022 · 5 comments

Comments

@smallp
Copy link
Contributor

smallp commented Jan 15, 2022

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.0.0-beta.7

Environment

vue3 vite unplugin-vue-components

Reproduction link

I'll create one if needed.

Steps to reproduce

import { message } from "ant-design-vue"
import "ant-design-vue/lib/message/style/css"

What is expected?

work fine.

What is actually happening?

Uncaught Error: Dynamic require of "/Users/xiaoping/Documents/t/process/node_modules/.pnpm/[email protected][email protected]/node_modules/ant-design-vue/lib/style/index.css" is not supported

@smallp
Copy link
Contributor Author

smallp commented Jan 15, 2022

Changing lib to es works fine. So please update the document.

@zkwolf
Copy link
Member

zkwolf commented Jan 16, 2022

主要还是因为用了vite吧,看了一眼unplugin-vue-components插件的规则默认也是引用es下的

@smallp
Copy link
Contributor Author

smallp commented Jan 17, 2022

是的,我就是看了那个插件发现引用es,就尝试了一下好了。

@github-actions
Copy link

Hello @smallp. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please send your Pull Request to proper branch, fill the Pull Request Template here, provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!

你好 @smallp,我们完全同意你的提议/反馈,欢迎直接在此仓库创建一个 Pull Request 来解决这个问题。请将 Pull Request 发到正确的分支,务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants