update require.js and fix toUrl call
This commit is contained in:
parent
212214dfad
commit
91b42b43d3
2 changed files with 106 additions and 68 deletions
|
|
@ -53,12 +53,12 @@ var WorkerClient = function(topLevelNamespaces, mod, classname) {
|
|||
// nameToUrl is renamed to toUrl in requirejs 2
|
||||
if (require.nameToUrl && !require.toUrl)
|
||||
require.toUrl = require.nameToUrl;
|
||||
workerUrl = normalizePath(require.toUrl("ace/worker/worker", null, "_"));
|
||||
workerUrl = normalizePath(require.toUrl("ace/worker/worker.js", null, "_"));
|
||||
}
|
||||
|
||||
var tlns = {};
|
||||
topLevelNamespaces.forEach(function(ns) {
|
||||
tlns[ns] = normalizePath(require.toUrl(ns, null, "_").replace(/.js(\?.*)?$/, ""));
|
||||
tlns[ns] = normalizePath(require.toUrl(ns, null, "_").replace(/(\.js)?(\?.*)?$/, ""));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue