-
-
Save dillionverma/4450c1fc106002117c3aa35bddab9e94 to your computer and use it in GitHub Desktop.
declare module 'lucide-react' { | |
export * from 'lucide-react/dist/lucide-react.suffixed' | |
} |
{ | |
"typescript.preferences.autoImportSpecifierExcludeRegexes": [ | |
"@radix-ui", | |
"next/router", | |
"next/dist", | |
"^lucide-react/dist/lucide-react.suffixed$", | |
] | |
} |
{ | |
"compilerOptions": { | |
"baseUrl": ".", | |
} | |
} |
For the lucide-react.d.ts file I get this error:
Cannot find module 'lucide-react/dist/lucide-react.suffixed' or its corresponding type declarations.
The non-".suffixed" import works but not what I desire.
I might just be out of date on the package, but leaving this here as a question for others too, might answer my own question when I upgrade packages.
+1
how do i import icons from lucide-react with this?, its not working
Module '"lucide-react"' has no exported member 'ExternalLink'.
and for other icons
Using this approach implies that Icon imports will always be suffixed with Icon
. For example ExternalLink
will no longer work but ExternalLinkIcon
will. @Ardian-Hoti
Using this approach implies that Icon imports will always be suffixed with
Icon
. For exampleExternalLink
will no longer work butExternalLinkIcon
will. @Ardian-Hoti
Oh okay, so i have to change all my icons in my entire app to have icon in the end, okay a bit of work for now but for future time saver. Thanks!
For the lucide-react.d.ts file I get this error:
Cannot find module 'lucide-react/dist/lucide-react.suffixed' or its corresponding type declarations.
The non-".suffixed" import works but not what I desire.
I might just be out of date on the package, but leaving this here as a question for others too, might answer my own question when I upgrade packages.