Merge pull request #304 from sourcelair/update-addons-paths

Make add-ons load Terminal from dist
This commit is contained in:
Paris Kasidiaris
2016-10-10 10:12:50 +03:00
committed by GitHub
7 changed files with 13 additions and 12 deletions
+1 -1
View File
@@ -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);