Closed numToStr closed 4 years ago
Interesting. I just realized that we never actually supported ES modules for path imports like @material-ui/icons/ArrowBackTwoTone
. Will investigate first thing tomorrow.
I think that @material-ui/icons
should receive a special treatment, it's not a package like the other. Maybe we should?
import { Close } from '@material-ui/icons';
How are FontAwesome / react-icons scaling to 5k+ icons? Say we want to provide 10k+ icons with the types, how to best architecture it?
import { Close } from '@material-ui/icons';
I guess we all are aware of that using this syntax to import icons slows down the initial dev startup quite a bit.
I would prefer this syntax anyday over named imports for icons.
import Close from '@material-ui/icons/Close';
We don't want to ban named import since this is the way forward. Tooling is just not there at the moment. There's no reason to ban it.
@eps1lon Ok, the current compromise looks great!
So which syntax we should use now onwards?
that works for me
const nextConfig = { transpilePackages: ['@mui/material'], // .... rest of config };
Current Behavior 😯
After importing any icon from
@materila-ui/icons@v5-alpha.13
I am getting the below error:This issue is only comming from
icons
,core
is working fine.Steps to Reproduce 🕹
I have just used the updated nextjs example and converted into typescript
https://codesandbox.io/s/nextjs-materialui-ts-wz93e
Your Environment 🌎