diff --git a/resolvers/webpack/index.js b/resolvers/webpack/index.js index 778350c46..4de118bbe 100644 --- a/resolvers/webpack/index.js +++ b/resolvers/webpack/index.js @@ -34,7 +34,7 @@ exports.resolveImport = function resolveImport(source, file, settings) { // see if we've got an absolute path if (!isAbsolute(configPath)) { // if not, find ancestral package.json and use its directory as base for the path - var packageDir = findRoot(file) + var packageDir = findRoot(path.resolve(file)) if (!packageDir) throw new Error('package not found above ' + file) configPath = path.join(packageDir, configPath)