CommonJS 是个规范,主要用于js后端,
var foo = require("./foo");
foo("Hi");
AMD前置加载 require.js
require(['math'], function (math) {
math.add(2, 3);
});
CMD后置加载 sea.js
define(function(require,exports,module){
var a = require('./a');
a.doSomthing();
});
参考文件 https://www.cnblogs.com/chenguangliang/p/5856701.html