Skip to content

Commit 95fca26

Browse files
committed
process.cwd() will return dirname of location.pathname, webpack#21
1 parent 7a36c44 commit 95fca26

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎buildin/__webpack_process.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ exports.nextTick = (function(func) {
3939
};
4040
}());
4141
exports.cwd = function() {
42-
return "/app";
42+
var pathname = (window.location.pathname+"").split("/");
43+
pathname.pop();
44+
return pathname.join("/");
4345
}
4446
exports.exit = exports.kill =
4547
exports.chdir =

0 commit comments

Comments
 (0)