Closed distance321 closed 10 months ago
组件库打包时会报错,'ThemeProvider' cannot be used as a JSX component.
当package.json中的@typescript-eslint/eslint-plugin、@typescript-eslint/parser升到5以上时,组件库内使用ThemeProvider在打包时就会报错, 在4.x时没有这个问题。
为啥关了
发现并不是因为升级@typescript-eslint的问题 降版本后也不行
升级这些依赖可以解决这个问题 "@types/react": "^18.0.10", "@types/react-dom": "^18.0.5",
"@types/react": "^18.0.10", "@types/react-dom": "^18.0.5",
🐛 bug 描述
组件库打包时会报错,'ThemeProvider' cannot be used as a JSX component.
📷 复现步骤
当package.json中的@typescript-eslint/eslint-plugin、@typescript-eslint/parser升到5以上时,组件库内使用ThemeProvider在打包时就会报错, 在4.x时没有这个问题。
💻 复现代码
© 版本信息
🚑 其他信息