kopia lustrzana https://github.com/c9/core
change updateRequireConfig in language.js to work with mini_require
rodzic
131091a73f
commit
da2f81a890
|
@ -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() {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Ładowanie…
Reference in New Issue