ant-design / antd-style

css-in-js library with antd v5 token system
https://ant-design.github.io/antd-style/
MIT License
187 stars 29 forks source link

'ThemeProvider' cannot be used as a JSX component.🐛[BUG] #98

Closed distance321 closed 10 months ago

distance321 commented 10 months ago

🐛 bug 描述

组件库打包时会报错,'ThemeProvider' cannot be used as a JSX component.

📷 复现步骤

当package.json中的@typescript-eslint/eslint-plugin、@typescript-eslint/parser升到5以上时,组件库内使用ThemeProvider在打包时就会报错, 在4.x时没有这个问题。

💻 复现代码

image

© 版本信息

🚑 其他信息

image

arvinxx commented 10 months ago

为啥关了

distance321 commented 10 months ago

发现并不是因为升级@typescript-eslint的问题 降版本后也不行

distance321 commented 10 months ago

升级这些依赖可以解决这个问题
"@types/react": "^18.0.10", "@types/react-dom": "^18.0.5",