Skip to content

Commit

Permalink
add react-icons to optimizePackageImports
Browse files Browse the repository at this point in the history
  • Loading branch information
shuding committed Sep 19, 2023
1 parent d5c35a1 commit 2de7442
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions packages/next/src/server/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,42 @@ function assignDefaults(
'@material-ui/icons',
'@tabler/icons-react',
'mui-core',
// We don't support wildcard imports for these configs, e.g. `react-icons/*`
// so we need to add them manually.
// In the future, we should consider automatically detecting packages that
// need to be optimized.
'react-icons/ai',
'react-icons/bi',
'react-icons/bs',
'react-icons/cg',
'react-icons/ci',
'react-icons/di',
'react-icons/fa',
'react-icons/fa6',
'react-icons/fc',
'react-icons/fi',
'react-icons/gi',
'react-icons/go',
'react-icons/gr',
'react-icons/hi',
'react-icons/hi2',
'react-icons/im',
'react-icons/io',
'react-icons/io5',
'react-icons/lia',
'react-icons/lib',
'react-icons/lu',
'react-icons/md',
'react-icons/pi',
'react-icons/ri',
'react-icons/rx',
'react-icons/si',
'react-icons/sl',
'react-icons/tb',
'react-icons/tfi',
'react-icons/ti',
'react-icons/vsc',
'react-icons/wi',
]),
]

Expand Down

0 comments on commit 2de7442

Please # to comment.