ant-design-icons
ant-design-icons copied to clipboard
import from @ant-design/icons super slow
I'm using [email protected] with [email protected].
Any import of an Icon makes the app super slow on initial load (only initial site load).
E.g. using
import { LaptopOutlined, NotificationOutlined, UserOutlined } from '@ant-design/icons';
increases triggered site-reload to 10 seconds, while removing this line, site reload takes < 1 second.
Same here
try the following: instead of using the named import
import { LaptopOutlined, NotificationOutlined, UserOutlined } from '@ant-design/icons';
use the default import for each icon:
import LaptopOutlined from '@ant-design/icons/LaptopOutlined';
import NotificationOutlined from '@ant-design/icons/NotificationOutlined';
import UserOutlined from '@ant-design/icons/UserOutlined';
this prevents from importing all icons.
try the following: instead of using the named import
import { LaptopOutlined, NotificationOutlined, UserOutlined } from '@ant-design/icons';
use the default import for each icon:
import LaptopOutlined from '@ant-design/icons/LaptopOutlined'; import NotificationOutlined from '@ant-design/icons/NotificationOutlined'; import UserOutlined from '@ant-design/icons/UserOutlined';
this prevents from importing all icons.
Thank you very much, I missed tho think about that! Thanks!