How to remove ESlint error no-unresolved from importing 'react'

前端 未结 4 2152
春和景丽
春和景丽 2021-02-14 01:05

no-unresolved https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md

After installing eslint-import-resolver-webpack

4条回答
  •  说谎
    说谎 (楼主)
    2021-02-14 01:24

    The problem is that your webpack config is written in ES6 format, which doesn't play well with eslint-import-resolver-webpack.

    So, you either refactor your webpack.config.js using ES5 syntax, or you get rid of eslint-import-resolver-webpack.

    See here for the full solution: eslint plugin docs

提交回复
热议问题