Dojo Build - copyOnly 在配置文件中不起作用

Dojo Build - copyOnly does not work in profile

我正在 DOJO 中创建自定义构建。我需要在构建文件夹 dojoConfig.js 中保留未缩小的文件。

目前我正在尝试: - 使用 miniExclude 从构建中排除 dojoConfig.js,这很好用 - 在 copyOnly 到没有压缩的最终构建 dojoConfig.js 之后,这不起作用。

我需要在构建文件夹中复制 dojoConfig.js。

知道我的个人资料有什么问题吗?

miniExclude: function(o, e) {
                    return e in {
                        "aaa/aaa.profile": 1,
                        "aaa/dojoConfig": 1
                    }
                },
                copyOnly: function(o, e) {
                    return e in {
                        "aaa/dojoConfig": 1
                    }
                }

var profile = function() {
    return {
        basePath: "../",
        releaseDir: "dist",
        releaseName: "build",
        optimize: "closure",
        action: "release",
        layerOptimize: "closure",
        copyTests: !1,
        stripConsole: "all",
        version: "0.0.0",
        cssOptimize: "comments",
        mini: !0,
        copyTests: !1,
        useSourceMaps: !1,
        staticHasFeatures: {
            "config-dojo-loader-catches": 0,
            "config-tlmSiblingOfDojo": 0,
            "dojo-amd-factory-scan": 0,
            "dojo-combo-api": 0,
            "dojo-config-api": 1,
            "dojo-config-require": 0,
            "dojo-debug-messages": 0,
            "dojo-dom-ready-api": 1,
            "dojo-firebug": 0,
            "dojo-guarantee-console": 1,
            "dojo-has-api": 1,
            "dojo-inject-api": 1,
            "dojo-loader": 1,
            "dojo-log-api": 0,
            "dojo-modulePaths": 0,
            "dojo-moduleUrl": 0,
            "dojo-publish-privates": 0,
            "dojo-requirejs-api": 0,
            "dojo-sniff": 1,
            "dojo-sync-loader": 0,
            "dojo-test-sniff": 0,
            "dojo-timeout-api": 0,
            "dojo-trace-api": 0,
            "dojo-undef-api": 0,
            "dojo-v1x-i18n-Api": 1,
            "dojo-xhr-factory": 0,
            dom: 1,
            "host-browser": 1,
            "extend-dojo": 1
        },
        resourceTags: {
            amd: function(o) {
                return /\.js$/.test(o)
            },
            miniExclude: function(o, e) {
                return e in {
                    "aaa/test.profile": 1,
                    "aaa/dojoConfig": 1
                }
            },
            copyOnly: function(o, e) {
                return e in {
                    "test/dojoConfig": 1
                }
            }
        },
        packages: [{
            name: "dojo",
            location: "dojo"
        }, {
            name: "test",
            location: "test"
        }],
        layers: {
            "dojo/dojo": {
                include: ["dojo/dojo"],
                customBase: !0,
                boot: !0
            },
            "aaa/aaa-shared": {
                include: ["test/shared/bootstrapShared"],
                customBase: !0,
                boot: !1
            },
            "aaa/aaa-content": {
                include: ["test/content/bootstrap"],
                customBase: !0,
                boot: !1
            },
            "aaa/aaa-builder": {
                include: ["test/builder/bootstrapBuilder"],
                customBase: !0,
                boot: !1
            }
        }
    }
}();

我不确定这是否是你的问题,但 miniExclude 优先于 copyOnly,因此将某些内容标记为两者意味着它不会默认包含在构建输出中(因为 mini: true 是默认设置,您通常不想更改它)。如果您总是 想要复制文件而不进行其他处理,只需将其包含在 copyOnly 中,而不是 miniExclude.