kissyteam / kissy

A Powerful Collection Of Modules
http://docs.kissyui.com
2.7k stars 863 forks source link

loader:package的combine无法覆盖全局的combine设置,不写name的模块无法正常加载 #319

Closed bakso closed 11 years ago

bakso commented 11 years ago

demo请移步:http://demo.tmall.net/sell/darwin/detail/test.php?ks-debug 描述:在开启ks-debug的情况下,如果全局上设置了

S.config("combine", true);

,那么不写name的模块无法正常加载,即使该包设置了combine false

//seed.js:
(function(S) {

    S.config("combine", true);

    S.config({
        packages: {
            detail: {
                name: "detail",
                base: "http://<?=$_SERVER[HTTP_HOST]?>/sell/darwin",
                charset: "gbk",
                combine: false
            }
        }
    });

    S.use('detail/main');

})(KISSY);
//main.js:
KISSY.add(function (S) {
    alert('');
});
bakso commented 11 years ago
Uncaught TypeError: Object function (S) {
    alert('');
} has no method 'charAt' 
yiminghe commented 11 years ago

combine 全局设置 true 必须用工具 http://docs.kissyui.com/docs/html/tutorials/tools/module-compiler/index.html 处理,

combine true只用于线上,调试请设置 combine false