使用Gridx的Dojo自定义构建

83qze16e  于 2022-12-16  发布在  Dojo
关注(0)|答案(1)|浏览(217)

因此,我一直在尝试在添加gridx小部件后构建DOJO
我在app.profile.js文件中添加了gridx模块,如下所示:

layers: {
    "gridx/gridx": {
        include: [
            "gridx/Grid",
            "gridx/core/model/cache/Async",
            "gridx/modules/CellWidget",
            "gridx/modules/Edit",
            "gridx/modules/Filter",
            "gridx/modules/Pagination",
            "gridx/modules/pagination/PaginationBar"
                ]
    }
}

在编译过程中,我不断收到这些错误。
错误(311)缺少依赖项。模块:应用程序/屏幕;依赖性:js/plugins/gridx/网格错误(311)缺少依赖项。应用程序/屏幕;依赖性:js/plugins/gridx/core/model/缓存/异步错误(311)缺少依赖项。应用程序/屏幕;依赖性:js/plugins/gridx/modules/单元窗口小部件错误(311)缺少依赖项。应用程序/屏幕;依赖性:js/plugins/gridx/modules/编辑错误(311)缺少依赖项。应用程序/屏幕;依赖性:js/plugins/gridx/modules/过滤器错误(311)缺少依赖项。应用程序/屏幕;依赖性:js/plugins/gridx/modules/分页错误(311)缺少依赖项。应用程序/屏幕;依赖性:js/插件/网格/模块/分页/分页栏
不确定我在这里错过了什么,我已经排除故障有一段时间了。
packages.json代码

{
    "name": "app",
    "version": "1.0",
    "dependencies": {
        "dojo": "current",
        "dijit": "current",
        "dojox": "current",
        "util": "current",
        "gridx": "current",
    },
    "description": "app Components Package",
    "dojoBuild": "app-common.profile.js"
}
w1jd8yoj

w1jd8yoj1#

您的构建概要文件需要一个packages部分,它将告诉构建gridx代码的位置。

构建.配置文件.js

basePath:       "../dojo-release-1.8.3-src",
...
packages:[
    {name: 'dojo', location: 'dojo'},
    {name: 'dijit', location: 'dijit'},
    {name: 'dojox', location: 'dojox'},
    {name: 'gridx', location: '../PATH/TO/gridx'} // path is relative from basePath
],

相关问题