Lucide React Updates (dynamicIconImports
)
Due to startup problems with build engines like ESBuild (e.g. Remix and Vite). We move to a different way of importing the dynamicIconImports
. It's now in a separate entry module so compilers won't compile all dynamic imports when loading lucide-react. See #1437
Updated example from v0.260.0
import dynamic from 'next/dynamic'
- import { dynamicIconImports, LucideProps } from 'lucide-react';
+ import { LucideProps } from 'lucide-react';
+ import dynamicIconImports from 'lucide-react/dynamicIconImports';
interface IconProps extends LucideProps {
name: keyof typeof dynamicIconImports;
}
const Icon = ({ name, color, size }: IconProps) => {
const LucideIcon = dynamic(dynamicIconImports[name])
return <LucideIcon color={color} size={size} />;
};
export default Icon;
New icons 🎨
boom-box
(#1249) by @danielbayleybring-to-front
(#1425) by @james-yeomanpencil-line
(#1286) by @danielbayleypencil-ruler
(#1286) by @danielbayleysend-horizonal
(#1411) by @danielbayleysend-to-back
(#1425) by @james-yeoman
Modified Icons 🔨
pencil
(#1286) by @danielbayleysend
(#1411) by @danielbayley