make 'require is defined' a precondition for Node-based sys

This commit is contained in:
Vladimir Matveev 2015-08-14 20:53:38 -07:00
parent 7e8cfa0859
commit bc3025b391

View file

@ -334,7 +334,7 @@ namespace ts {
if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") {
return getWScriptSystem();
}
else if (typeof process !== "undefined" && process.nextTick && !process.browser) {
else if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") {
// process and process.nextTick checks if current environment is node-like
// process.browser check excludes webpack and browserify
return getNodeSystem();