Skip to content

Commit

Permalink
[resolvers/webpack] [fix] provide config fallback
Browse files Browse the repository at this point in the history
Fixes #1448
  • Loading branch information
migueloller authored and ljharb committed Mar 29, 2020
1 parent cf8b3d9 commit 95c12fc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 7 additions & 1 deletion resolvers/webpack/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel

## Unreleased

### Fixed
- [fix] provide config fallback ([#1705], thanks [@migueloller])

## 0.12.0 - 2019-12-07

### Added
Expand All @@ -13,7 +16,7 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel
## 0.11.1 - 2019-04-13

### Fixed
- [fix] match coreLibs after resolveSync in webpack-resolver ([#1297])
- [fix] match coreLibs after resolveSync in webpack-resolver ([#1297], thanks [@echenley])

## 0.11.0 - 2018-01-22

Expand Down Expand Up @@ -122,6 +125,7 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel
- `interpret` configs (such as `.babel.js`).
Thanks to [@gausie] for the initial PR ([#164], ages ago! 😅) and [@jquense] for tests ([#278]).

[#1705]: https://github.com/benmosher/eslint-plugin-import/pull/1705
[#1503]: https://github.com/benmosher/eslint-plugin-import/pull/1503
[#1297]: https://github.com/benmosher/eslint-plugin-import/pull/1297
[#1261]: https://github.com/benmosher/eslint-plugin-import/pull/1261
Expand Down Expand Up @@ -172,4 +176,6 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel
[@mattkrick]: https://github.com/mattkrick
[@idudinov]: https://github.com/idudinov
[@keann]: https://github.com/keann
[@echenley]: https://github.com/echenley
[@Aghassi]: https://github.com/Aghassi
[@migueloller]: https://github.com/migueloller
6 changes: 6 additions & 0 deletions resolvers/webpack/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ exports.resolve = function (source, file, settings) {
}
}

if (webpackConfig == null) {
webpackConfig = {}

console.warn('No webpack configuration with a "resolve" field found. Using empty object instead')
}

log('Using config: ', webpackConfig)

// externals
Expand Down

0 comments on commit 95c12fc

Please sign in to comment.