代码之家  ›  专栏  ›  技术社区  ›  paragbaxi

e-forge--template=vscode中的typescript webpack给出错误,无法解析模块的路径/模块名称'

  •  0
  • paragbaxi  · 技术社区  · 6 年前

    该应用程序运行良好 yarn start 所以webpack发现这个模块很好。但我无法让vscode看到它。

    0 回复  |  直到 6 年前
        1
  •  0
  •   Ivo Benedito    5 年前

    您需要安装 eslint-import-resolver-typescript

    yarn add --dev eslint-plugin-import @typescript-eslint/parser eslint-import-resolver-typescript
    

    此外,在点文件上 .eslintrc.js ,确保在根目录中包含:

    "settings": {
      "import/resolver": {
        "typescript": {},
      },
    },