diff --git a/lib/babel-build.js b/lib/babel-build.js index 295ae7682b5..a66b5d49cc5 100644 --- a/lib/babel-build.js +++ b/lib/babel-build.js @@ -26,7 +26,9 @@ function babelOptions(libraryName, _options) { getModuleId: function (name) { return name.replace(/\/index$/g, ''); }, - resolveModuleSource: moduleResolve + resolveModuleSource: function(source, fileName) { + return moduleResolve.call(this, source, libraryName + '/' + fileName); + } }; Object.keys(_options).forEach(function(opt) {