我想知道如何使用多个文件制作requirejs模块.我需要一个文件然后以某种方式获取多个文件.我知道我可以这样做:
define([all the other files], function () {
var mod = {},
files = [all the other files];
arguments.forEach(function (i) {
mod.[files[i]] = i;
});
return mod;
});
Run Code Online (Sandbox Code Playgroud)
但我想知道是否有更好的方法?