diff --git a/resolvers/webpack/CHANGELOG.md b/resolvers/webpack/CHANGELOG.md index 49ffdb3db..871a06ac0 100644 --- a/resolvers/webpack/CHANGELOG.md +++ b/resolvers/webpack/CHANGELOG.md @@ -5,6 +5,10 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel ## Unreleased +## 0.5.1 - 2016-08-11 +### Fixed +- don't throw and die if no webpack config is found + ## 0.5.0 - 2016-08-11 ### Added - support for Webpack 2 + `module` package.json key! ([#475], thanks [@taion]) diff --git a/resolvers/webpack/index.js b/resolvers/webpack/index.js index 43f81263e..18783d3fe 100644 --- a/resolvers/webpack/index.js +++ b/resolvers/webpack/index.js @@ -61,7 +61,12 @@ exports.resolve = function (source, file, settings) { configPath = findConfigPath(configPath, packageDir) log('Config path resolved to:', configPath) - webpackConfig = require(configPath) + if (configPath) { + webpackConfig = require(configPath) + } else { + log("No config path found relative to", file, "; using {}") + webpackConfig = {} + } if (webpackConfig && webpackConfig.default) { log('Using ES6 module "default" key instead of module.exports.') diff --git a/resolvers/webpack/package.json b/resolvers/webpack/package.json index 613d995b2..9ac5a60a0 100644 --- a/resolvers/webpack/package.json +++ b/resolvers/webpack/package.json @@ -1,6 +1,6 @@ { "name": "eslint-import-resolver-webpack", - "version": "0.5.0", + "version": "0.5.1", "description": "Resolve paths to dependencies, given a webpack.config.js. Plugin for eslint-plugin-import.", "main": "index.js", "scripts": {