diff --git a/js/common/bootstrap/modules.js b/js/common/bootstrap/modules.js index a17dcaf30a..465306cbbb 100644 --- a/js/common/bootstrap/modules.js +++ b/js/common/bootstrap/modules.js @@ -834,6 +834,17 @@ function require (path) { } } + // check if there is a package containing this module + path = path.substr(1); + if (path.indexOf('/') !== -1) { + var p = path.split('/'); + localModule = requirePackage(currentModule, '/' + p.shift()); + if (localModule !== null) { + localModule = requirePackage(localModule, '/' + p.join('/')); + return localModule; + } + } + // nothing found return null; }