我正在使用dojo 1.10并在创建构建时遇到“缺少依赖性”错误。
我的个人资料.js:
var profile = (function(){
return {
......
packages:[{
name: "dojo",
location: "dojo"
},{
name: "dijit",
location: "dijit"
},{
name: "dojox",
location: "dojox"
},{
name: "app",
location: "app"
}],
layers: {
"dojo/dojo": {
include: [ "dojo/dojo", "dojo/i18n", "dojo/domReady", "app/f1/f11/mymodule"],
customBase: true,
boot: true
},
"app/f1/f11/mymodule": {
include: [ "app/f1/f11/myModule" ]
}
}
};
})();
我的dojoConfig.js:
var dojoConfig = {
packages: [{
name: "f1",
location: "C:/absolutePathToApp/app/f1"
},{
name: "f2",
location: "C:/absolutePathToApp/app/f2"
}]
};
myModule.js需要依赖项,如:
define("f1/f11/myModule", [
"f1/someModule",
"f2/otherModule",
...
当我在命令行中使用--dojoConfig dojoConfig.js运行构建时,我得到了f1文件夹下但不是f2的模块的所有依赖性错误。我不知道为什么它可以为f2而不是f1设置路径别名,是因为myModule在f1内?
非常感谢任何建议或讨论!