Closed pybuche closed 5 years ago
- import 'antd/lib/style/core/iconfont.less';
+ import 'antd/lib/button/style';
But shouldn't the babel-import-plugin
do that for me ? With the .babelrc
line:
["import", { "libraryName": "antd", "style": true }]
I tried it anyway and it doesn't change my problem. antd/lib/button/style
is already imported in the transpiled files, but the icon spinning animation file is not :/
Could you provide a reproduce github repo?
Ok, I found the problem.
I did that https://github.com/ant-design/ant-design/issues/4331#issuecomment-426256185 to avoid having global style leak on my project. Thus the global iconfont & motion less files where not imported...
I switched to a different strategy that is this one https://github.com/ant-design/ant-design/issues/4331#issuecomment-396875383 I hope we can figure out a solution later to avoid having these hacks, I will look into it.
But this is not an issue, you can close it, thank you!
Hi,
I used this plugin to help me decrease my bundle size, but it results in having missing imports. At least, I noticed it with
Button
component, while using theloading
prop.My
Button
:And my
.babelrc
:Any idea how I could fix it? Thx!