ant-design-icons
ant-design-icons copied to clipboard
[Help] How to use it with `babel-plugin-import`.
Now, I only use a few icons in @ant-design/icons
.
I will use more in the future, but I definitely can't use all the icons.
When i import @ant-design/icons
like this:
import { AntDesignOutline, DashboardOutline, TwitterOutline } from '@ant-design/icons';
import AntdIcon from '@ant-design/icons-react';
AntdIcon.add(AntDesignOutline, DashboardOutline);
Webpack bundle all icons, including what I didn't use.
I am not sure if I can use it with babel-plugin-import
.
It is awesome, if we can dynamic import icons just like antd
Any updates on this?
I don't know if it works well
[
"import",
{
"libraryName": "@ant-design/icons",
"customName": (name, file) => {
// do something in this
// return `libs/${name}`
}
}
]