Last active
June 9, 2025 23:09
-
-
Save dillionverma/4450c1fc106002117c3aa35bddab9e94 to your computer and use it in GitHub Desktop.
How to stop @radix-ui, next/router and lucide-react auto-imports
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module 'lucide-react' { | |
export * from 'lucide-react/dist/lucide-react.suffixed' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"typescript.preferences.autoImportSpecifierExcludeRegexes": [ | |
"@radix-ui", | |
"next/router", | |
"next/dist", | |
"^lucide-react/dist/lucide-react.suffixed$", | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"compilerOptions": { | |
"baseUrl": ".", | |
} | |
} |
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!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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