按如下方式导入redux-saga:
import { takeLatest } from 'redux-saga/effects'
ESLint引发了以下错误:
Error while running ESLint: Cannot find module
'/Users/cjpitt/project/node_modules/redux-saga/config/webpack.config.dev.js'
我的ESLint配置包含导入解析器,如下所示:
"settings": {
"import/resolver": {
"webpack": {
"config": "./config/webpack.config.dev.js"
}
}
},
包含示例的存储库:https://github.com/cjpete/redux-saga-import-issue
问题:
为什么ESLint会尝试使用'node_modules / redux-saga / config / webpack.config.dev.js'来导入模块?
如何在不更改导入解析器的情况下解决此问题?