diff --git a/src/core.js b/src/core.js index 584f7c07..15dbe886 100644 --- a/src/core.js +++ b/src/core.js @@ -138,7 +138,11 @@ module.exports = function core(defaultLibraryName) { const file = (path && path.hub && path.hub.file) || (state && state.file); if (!types.isIdentifier(node[prop])) return; if (specified[node[prop].name]) { - node[prop] = importMethod(node[prop].name, file, state.opts); // eslint-disable-line + var methodName = node[prop].name; + if(specified[node[prop].name] !== node[prop].name) { + methodName = specified[node[prop].name]; + } + node[prop] = importMethod(methodName, file, state.opts); // eslint-disable-line } }