optimizePackageImports
某些包可能会导出数百甚至数千个模块,这可能导致开发和生产环境下的性能问题。
将包添加到 experimental.optimizePackageImports
后,将仅加载实际使用的模块,同时仍保留通过命名导出编写导入语句的便利性。
以下库已默认优化:
lucide-react
date-fns
lodash-es
ramda
antd
react-bootstrap
ahooks
@ant-design/icons
@headlessui/react
@headlessui-float/react
@heroicons/react/20/solid
@heroicons/react/24/solid
@heroicons/react/24/outline
@visx/visx
@tremor/react
rxjs
@mui/material
@mui/icons-material
recharts
react-use
@material-ui/core
@material-ui/icons
@tabler/icons-react
mui-core
react-icons/*