不要怂,就是干,撸起袖子干!

Commit eb063916 by Sascha Depold

fixed path resolution

1 parent b31e5a3c
Showing with 5 additions and 2 deletions
......@@ -219,8 +219,11 @@ module.exports = (function() {
// is it a relative path?
if (url.parse(path).pathname.indexOf('/') !== 0) {
// make path relative to the caller
var callerFilename = Utils.stack()[1].getFileName();
path = Path.resolve(callerFilename, path);
var callerFilename = Utils.stack()[1].getFileName()
, callerMatch = callerFilename.match(/(.+\/).+?$/)
, callerPath = callerMatch[1]
path = Path.resolve(callerPath, path)
}
if (!this.importCache[path]) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!