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

Commit

Permalink
fix: Fix resolution when using a custom cwd (#55)
Browse files Browse the repository at this point in the history
Fixes #43
  • Loading branch information
tleunen authored Apr 25, 2017
1 parent 40e2f3c commit 188f338
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ exports.resolve = (source, file, opts) => {
extensions: plugin[1] && plugin[1].extensions ? plugin[1].extensions : config.extensions,
}), { root: [], alias: {}, cwd: projectRootDir });


normalizeOptions(pluginOpts, file);

const babelState = {
file: {
opts: {
Expand All @@ -69,6 +66,8 @@ exports.resolve = (source, file, opts) => {
},
opts: pluginOpts,
};

normalizeOptions(pluginOpts, babelState);
const src = getRealPath(source, babelState);

const extensions = options.extensions || pluginOpts.extensions;
Expand Down

0 comments on commit 188f338

Please sign in to comment.