Dojo huge footprint- Am I doing something wrong

时光毁灭记忆、已成空白 提交于 2019-12-11 11:40:39

问题


I am making a web application using dojo toolkit and heres my code

dojo.ready(
 function(){
 dojo.declare("Main",null,{
_dialog:null,
constructor: function()
{
    dojo.require("dijit.Dialog");
},
make_dialog: function(url)
{
    _dialog= new dijit.Dialog({
        href:url,
    });
    _dialog.show();
}
}); // class ends

temp=new Main();
});// dojo.ready ends

My problem is that when I load dijit.Dialog it is loading various js files( 20 plus) like tooltip.js,backgroundIframe.js taking about 60kb alone. I want to ask is it dojo normal behaviour or I am doing

And my main problem Is that it making 55 different request. Please help me.


回答1:


A custom build will package everything up into a fewer files.

http://dojotoolkit.org/reference-guide/quickstart/custom-builds.html



来源:https://stackoverflow.com/questions/9640757/dojo-huge-footprint-am-i-doing-something-wrong

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!