Skip to content

Commit 04e68a2

Browse files
committed
[resolvers/webpack] [fix] use the dirname of the configPath as basedir
Fixes #2859
1 parent 4d32d68 commit 04e68a2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Diff for: resolvers/webpack/CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
44
This change log adheres to standards from [Keep a CHANGELOG](https://keepachangelog.com).
55

66
## Unreleased
7+
- [fix] use the `dirname` of the `configPath` as `basedir` ([#2859])
78

89
## 0.13.6 - 2023-08-16
910
- [refactor] revert back to `lodash/isEqual`
@@ -197,6 +198,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
197198
[#181]: https://github.com/import-js/eslint-plugin-import/pull/181
198199
[#164]: https://github.com/import-js/eslint-plugin-import/pull/164
199200

201+
[#2859]: https://github.com/import-js/eslint-plugin-import/issues/2859
200202
[#2268]: https://github.com/import-js/eslint-plugin-import/issues/2268
201203
[#1219]: https://github.com/import-js/eslint-plugin-import/issues/1219
202204
[#788]: https://github.com/import-js/eslint-plugin-import/issues/788

Diff for: resolvers/webpack/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ function createResolveSync(configPath, webpackConfig, cwd) {
183183

184184
if (typeof configPath === 'string') {
185185
// This can be changed via the settings passed in when defining the resolver
186-
basedir = cwd || configPath;
186+
basedir = cwd || path.dirname(configPath);
187187
log(`Attempting to load webpack path from ${basedir}`);
188188
}
189189

0 commit comments

Comments
 (0)