Skip to content

Commit

Permalink
[resolvers/webpack] [fix] use the dirname of the configPath as `b…
Browse files Browse the repository at this point in the history
…asedir`

Fixes #2859
  • Loading branch information
ljharb committed Aug 18, 2023
1 parent 4d32d68 commit 04e68a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions resolvers/webpack/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
This change log adheres to standards from [Keep a CHANGELOG](https://keepachangelog.com).

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

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

[#2859]: https://github.com/import-js/eslint-plugin-import/issues/2859
[#2268]: https://github.com/import-js/eslint-plugin-import/issues/2268
[#1219]: https://github.com/import-js/eslint-plugin-import/issues/1219
[#788]: https://github.com/import-js/eslint-plugin-import/issues/788
Expand Down
2 changes: 1 addition & 1 deletion resolvers/webpack/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function createResolveSync(configPath, webpackConfig, cwd) {

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

Expand Down

0 comments on commit 04e68a2

Please sign in to comment.