Importing icons via a start operator like import * as icons from 'lucide-react' instead of using import { icons } from 'lucide-react'results in two different icons objects. The one via start operator has 49 more icons that the actual import suggested by the docs here.
The following are the icons that can't be imported via import { icons } ...:
import icons using a start operator import * as icons from 'lucide-react'
get a list of all icons, use Object.keys(icons).filter((key) => !key.startsWith("Lucide") || !key.endsWith("Icon")) as Array<keyof typeof icons>
import icons using icons object export import { icons } from 'lucide-react'
compare the first list with this one Object.keys(icons)
Result first list will have 49 more icons than the second one
Checklist
[X] I have searched if someone has submitted a similar issue before and there weren't any. (Please make sure to also search closed issues, as this issue might already have been resolved.)
Package
Version
0.303.0
Browser
Operating system
Description
Importing icons via a start operator like
import * as icons from 'lucide-react'
instead of usingimport { icons } from 'lucide-react'
results in two different icons objects. The one via start operator has 49 more icons that the actual import suggested by the docs here.The following are the icons that can't be imported via
import { icons } ...
:Steps to reproduce
import * as icons from 'lucide-react'
Object.keys(icons).filter((key) => !key.startsWith("Lucide") || !key.endsWith("Icon")) as Array<keyof typeof icons>
icons
object exportimport { icons } from 'lucide-react'
Object.keys(icons)
Result first list will have 49 more icons than the second one
Checklist