Skip to content

Commit

Permalink
give up destructure syntax to be compatible with Node.js v4
Browse files Browse the repository at this point in the history
  • Loading branch information
johvin committed May 6, 2018
1 parent 2da0ff4 commit 1ac9055
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ exports.resolve = (modulePath, sourceFile, config) => {
config = {};
}

const { map, extensions } = config;
// in order to be compatible with Node.js v4,
// give up destructure syntax
const map = config.map;
const extensions = config.extensions;
const sourceDir = path.dirname(sourceFile);
let resolvePath = modulePath;

Expand Down
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ exports.resolve = (modulePath, sourceFile, config) => {
config = {};
}

const { map, extensions } = config;
// in order to be compatible with Node.js v4,
// give up destructure syntax
const map = config.map;
const extensions = config.extensions;
const sourceDir = path.dirname(sourceFile);
let resolvePath = modulePath;

Expand Down

0 comments on commit 1ac9055

Please sign in to comment.