Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

Commit

Permalink
fix(resolver): Add cascading support (#17)
Browse files Browse the repository at this point in the history
Start the babelrc config lookup from the current file directory

Fixes #15
  • Loading branch information
jgkim authored and tleunen committed Jul 21, 2016
1 parent 651f1d0 commit dd94f0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ exports.interfaceVersion = 2;
* @return {object}
*/
exports.resolve = (source, file, config) => {
const mapping = getMappingFromBabel(process.cwd()).reduce((memo, e) => {
const mapping = getMappingFromBabel(path.dirname(file)).reduce((memo, e) => {
memo[e.expose] = e.src; // eslint-disable-line no-param-reassign
return memo;
}, {});
Expand Down

0 comments on commit dd94f0a

Please sign in to comment.