diff --git a/plugins/c9.ide.language/language.js b/plugins/c9.ide.language/language.js index 73d8bc3d..84092300 100644 --- a/plugins/c9.ide.language/language.js +++ b/plugins/c9.ide.language/language.js @@ -588,13 +588,8 @@ define(function(require, exports, module) { } function updateRequireConfig(modulePath, worker) { - var path = window.requirejs.toUrl(modulePath, "", true); - var url = require.toUrl(path); - if (/^\w+:/.test(url)) { - var paths = {}; - paths[path] = url; - worker.call("initBaseUrls", [paths]); - } + var config = window.requirejs.getConfig(); + worker.call("updateRequireConfig", [config]); } plugin.on("load", function() { diff --git a/plugins/node_modules/ace/lib/ace/worker/worker.js b/plugins/node_modules/ace/lib/ace/worker/worker.js index 1557956b..75b9eccc 100644 --- a/plugins/node_modules/ace/lib/ace/worker/worker.js +++ b/plugins/node_modules/ace/lib/ace/worker/worker.js @@ -53,6 +53,10 @@ window.initSender = function initSender() { var main = window.main = null; var sender = window.sender = null; +window.updateRequireConfig = function(config) { + window.require.config(config); +}; + window.onmessage = function(e) { var msg = e.data; if (msg.event && sender) {