diff --git a/lib/utils/getModulePaths.js b/lib/utils/getModulePaths.js index 219d30b..cfdda67 100644 --- a/lib/utils/getModulePaths.js +++ b/lib/utils/getModulePaths.js @@ -9,9 +9,9 @@ module.exports = function() { , args = [].slice.call(arguments); packageJson.bundledDependencies.forEach( function( name ) { - var modulePath = [ 'modules', name ].concat( args ).join( path.sep ); - if ( fs.existsSync( modulePath ) || ( /(.*)+\/\*/.test( modulePath ) && fs.existsSync( RegExp.$1 + '/' ) ) ) { - paths.push( modulePath ); + var modulePath = [ 'modules', name ].concat( args ).join( path.sep ); + if ( fs.existsSync( modulePath ) || fs.existsSync( path.dirname( modulePath ) ) ) { + paths.push( modulePath ); } });