Skip to content

Commit 95c12fc

Browse files
miguelollerljharb
authored andcommitted
[resolvers/webpack] [fix] provide config fallback
Fixes #1448
1 parent cf8b3d9 commit 95c12fc

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

resolvers/webpack/CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel
55

66
## Unreleased
77

8+
### Fixed
9+
- [fix] provide config fallback ([#1705], thanks [@migueloller])
10+
811
## 0.12.0 - 2019-12-07
912

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

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

1821
## 0.11.0 - 2018-01-22
1922

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

128+
[#1705]: https://github.com/benmosher/eslint-plugin-import/pull/1705
125129
[#1503]: https://github.com/benmosher/eslint-plugin-import/pull/1503
126130
[#1297]: https://github.com/benmosher/eslint-plugin-import/pull/1297
127131
[#1261]: https://github.com/benmosher/eslint-plugin-import/pull/1261
@@ -172,4 +176,6 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel
172176
[@mattkrick]: https://github.com/mattkrick
173177
[@idudinov]: https://github.com/idudinov
174178
[@keann]: https://github.com/keann
179+
[@echenley]: https://github.com/echenley
175180
[@Aghassi]: https://github.com/Aghassi
181+
[@migueloller]: https://github.com/migueloller

resolvers/webpack/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,12 @@ exports.resolve = function (source, file, settings) {
119119
}
120120
}
121121

122+
if (webpackConfig == null) {
123+
webpackConfig = {}
124+
125+
console.warn('No webpack configuration with a "resolve" field found. Using empty object instead')
126+
}
127+
122128
log('Using config: ', webpackConfig)
123129

124130
// externals

0 commit comments

Comments
 (0)