diff --git a/src/xterm.js b/src/xterm.js index 83592bb7..b88ed880 100644 --- a/src/xterm.js +++ b/src/xterm.js @@ -642,7 +642,7 @@ Terminal.prototype.open = function(parent) { Terminal.loadAddon = function(addon, callback) { if (typeof exports === 'object' && typeof module === 'object') { // CommonJS - return require(__dirname + '/../addons/' + addon); + return require('../addons/' + addon); } else if (typeof define == 'function') { // RequireJS return require(['../addons/' + addon + '/' + addon], callback);