Answer the question
In order to leave comments, you need to log in
How to combine different ways of loading modules in RequireJS?
There is such code (modules module1, module2 and module3 are loaded in parallel):
define(['module1', 'module2', 'module3'], function (module1, module2, module3) {
return { /* ... */ };
});
define(function (require) {
var module1 = require('module1');
var module2 = require('module2');
return {
loadModule3: function () {
var module3 = require('module3');
}
};
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question