【问题标题】:Why eslint report Resolve error: unable to load resolver "webpack"?为什么 eslint 报告 Resolve error: unable to load resolver "webpack"?
【发布时间】:2017-10-26 00:01:24
【问题描述】:

这是我的 .eslintrc。为什么这个配置会导致 eslint 报告 Resolve error: unable to load resolver "webpack" ?

{
  // ...
  "settings": {
    "import/resolver": {
      webpack: {
        config: './node_modules/@ali/grunt-default-config/lib/webpack.eslint.config.js'
      }
    }
  }
}

【问题讨论】:

    标签: webpack eslint


    【解决方案1】:

    通过 resolve.js 你会发现 -> tryRequire(eslint-import-resolver-${name})

    其中名称变量是“webpack”。 所以,

    npm install -g eslint-import-resolver-webpack

    【讨论】:

      猜你喜欢
      • 2017-09-30
      • 1970-01-01
      • 2022-12-01
      • 1970-01-01
      • 2022-01-18
      • 2016-09-07
      • 1970-01-01
      • 2021-11-13
      • 2019-05-30
      相关资源
      最近更新 更多