最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Autocompletion for imports not working as expected in Nextjs project - Stack Overflow

programmeradmin2浏览0评论

All of a sudden for some reason, auto completion seems to be acting weird in my Nextjs-Typescript project. I am using VsCode. Anyone else encountered similar issue?

The import should simply be next/link

tsconfig.json

{
  "compilerOptions": {
    "target": "es5",
    "lib": ["dom", "dom.iterable", "esnext"],
    "allowJs": true,
    "skipLibCheck": true,
    "strict": true,
    "noEmit": true,
    "esModuleInterop": true,
    "module": "esnext",
    "moduleResolution": "bundler",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "jsx": "preserve",
    "incremental": true,
    "downlevelIteration": true,
    "useUnknownInCatchVariables": false,
    "plugins": [
      {
        "name": "next"
      }
    ],
    "paths": {
      "@*": ["./*"]
    }
  },
  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
  "exclude": ["node_modules"]
}

发布评论

评论列表(0)

  1. 暂无评论