Next.js Discord

Discord Forum

Component auto import priority

Unanswered
Satin Angora posted this in #help-forum
Open in Discord
Satin AngoraOP
Good afternoon. Tell me, is it possible (perhaps by means of VSCode) to set the priority of importing packages? Project on NextJS (React). There are custom components and components imported from third-party libraries (node_modules folder) with the same name. When I write the code and the automatic import is triggered, but it is not my component that is substituted, but a component from the library. For example:

import Form from ‘react-hook-form’
but need to
import Form from ‘src/my-components'.

Is it possible to set the priority so that in the list with a hint, first of all there are own components, and only then - from third-party libraries?

0 Replies