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

Using icons in the vite project will result in an error #1056

Open
joker77877 opened this issue Jul 21, 2024 · 6 comments · May be fixed by #1301
Open

Using icons in the vite project will result in an error #1056

joker77877 opened this issue Jul 21, 2024 · 6 comments · May be fixed by #1301
Labels
help wanted Extra attention is needed

Comments

@joker77877
Copy link

What happens?

Using icons in the vite project will result in an error.
image
image

How To Reproduce

Steps to reproduce the behavior: 1. 2.

Expected behavior 1. 2.

Context

  • Ant Design Web3 Version:
  • Node Version:
  • Platform:
@yutingzhao1991 yutingzhao1991 added the help wanted Extra attention is needed label Jul 26, 2024
Copy link

Hello @joker77877. We totally like your proposal/feedback, welcome to send us a Pull Request for it. provide changelog/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!

你好 @joker77877,我们完全同意你的提议/反馈,欢迎直接在此仓库 创建一个 Pull Request 来解决这个问题。提供改动所需相应的 changelog、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。

@yutingzhao1991
Copy link
Collaborator

看上去只是一个警告,会影响项目运行吗?

@joker77877
Copy link
Author

看上去只是一个警告,会影响项目运行吗?

不会但是为什么呢,一大串报错挺强迫症的

@yutingzhao1991
Copy link
Collaborator

看上去只是一个警告,会影响项目运行吗?

不会但是为什么呢,一大串报错挺强迫症的

嗯,我看看处理一下

@gin-lsl
Copy link
Collaborator

gin-lsl commented Jul 27, 2024

需要 babel-plugin-inline-react-svg 这个 plugin 修复,可以关注一下这个 Issue: airbnb/babel-plugin-inline-react-svg#126

@NoahStepheno
Copy link

需要 babel-plugin-inline-react-svg 这个 plugin 修复,可以关注一下这个 Issue: airbnb/babel-plugin-inline-react-svg#126

这个问题在 plugin 由于编译的问题,短时间不易处理。在调方倒是比较好处理,可以通过 hoc 的抹掉 defaultProps

const ErasedSVGComponent = withEraseDefaultProps(SVGComponent);

@yutingzhao1991 yutingzhao1991 linked a pull request Dec 25, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants