How to exclude dojo files from a layer when creating a dojo custom assembly?

I need to exclude dojolevel dependencies .

In principle, it app/Message.jscontains two links to dojo ["dojo/_base/declare", "dojo/topic"], but I need to leave the code dojoin the created layer to the buyer.

I am currently using the following code, but getting an error:

error (304) There is no exception module for the layer. missing: dojo / _ reason / declare; layer: app / app missing: dojo / topic; layer: application / application

Could you point me in the right direction and solve this error?

Notes: I use dojo1.10

var profile = {
        basePath: "../src/",
        action: "release",
        cssOptimize: "comments",
        mini: true,
        useSourceMaps: false,
        optimize: "closure",
        layerOptimize: "closure",
        packages: ["app"],
        stripConsole: "all",
        selectorEngine: "lite",
        layers: {
            "dojo/dojo": {
                boot: true,
                customBase: true
            },
            "app/app": {
                include: ["app/Message","app/Sender"],
                exclude: ["dojo/_base/declare", "dojo/topic"]
            }
        },
        staticHasFeatures: {
            "dojo-trace-api": !1,
            "dojo-log-api": !1,
            "dojo-publish-privates": !1,
            "dojo-sync-loader": !1,
            "dojo-xhr-factory": !1,
            "dojo-test-sniff": !1
        }
    };
+4
source share
1 answer

dojo , , .

var profile = {
    ...
    packages: ["app","dojo"],
    ...
};
0

Source: https://habr.com/ru/post/1616723/


All Articles