Cannot use React.lazy with Material UI icons
问题 as I have quite a lot of icons in many places in my app, I want to use code splitting for them. I have created helper component to do that: import React, { FunctionComponent, Suspense } from 'react'; interface LazyMuiIconProps { name: string; } export const LazyMuiIcon: FunctionComponent<LazyMuiIconProps> = ({ name }) => { console.log(name); const IconElement = React.lazy(() => import(`@material-ui/icons/${name}`)); // const IconElement = React.lazy(() => import(`@material-ui/icons/Home`));