requere.js优化js脚本加载方案,使用篇。
require.config({
paths: {
"jquery": "jquery-3.2.1",
'index':"index"
}
});
require(["jquery",'index'],function () {
return true;
});
require.config({
paths: {
"jquery": "jquery-3.2.1",
'index':"index"
}
});
require(["jquery",'index'],function () {
return true;
});