Change Auto-Import Priority Order In VScode
Asked Answered
L

0

11

I'm working on a Next-JS project with TypeScript. Everything was fine till one day, VSCode decided to change my auto-import priorty. In my case, I wanted to import useEffect, useContext,.. from react. But somehow, Vscode auto-import first-place changed to preact-hook, which is different from react and take me time to debug it later when I test the code.

Example:

Any Idea how can I change the order to let react goes first?

Lector answered 16/9, 2021 at 11:22 Comment(3)
I've noticed since the last update (or maybe I installed some extensions?) that my imports were working like a dream, and now it cannot seem to figure out simple imports like <Image auto-completing & auto-importing from next/image. This may be related to: #69038828Insomuch
I had exact same issue with next/image and next/linkLector
seems to be a dup of https://mcmap.net/q/1111298/-vs-code-typescript-auto-import-suggestion-priority/11107541Hurless

© 2022 - 2024 — McMap. All rights reserved.