Why creating dojo creates all packages as layers?

I am trying to create an assembly using dojo, which is as simple as it can be.

The only package I installed is Arcgis-js-api using the gazebo:

"dependencies": {
    "esri": "arcgis-js-api#3.21.0"
}

my build.profile.js is defined as follows:

var profile = {
  basePath: "./src",
  action: "release",
  cssOptimize: "comments",
  mini: true,
  layerOptimize: "closure",
  packages: [
    "app",
    "dijit",
    "dojo",
    "dojox",
    "dstore",
    "dgrid",
    "dgrid1",
    "xstyle",
    "put-selector",
    "esri", {
      name: "moment",
      location: "moment",
      main: "moment"
    }
  ],
  useSourceMaps: false,
  mini: true,
  stripConsole: "warn",
  selectorEngine: "lite",

    layers: [{
      "dojo/dojo": {
        boot: true,
        customBase:true,
        include: [
          "app/main"
        ]
      }
    }]
};

If I understood the dojo documentation in the assembly system correctly, this should create one output file in dojo / dojo.js that contains all the dependencies, but when I create the assembly using this profile, I get for every package that was defined.

The app / main package consists of one call to console.log:

define([],function(){
    console.log("ratzupaltuff");
});

I expect to get only a small release, since I am essentially not using dojo anything.

, ? - 114 , , , .

+4
2

:

, : " , , , ?" , .

, , , , dojo/dojo.js, 100 .

, script , , AMD (, ).

dojo " " script. , , . , , , , - , , , .

node ../../dojo/dojo.js load=build --profile "$PROFILE" --releaseDir "$DISTDIR" $@
# ... 
FILES=(
    index.html
    myapp/resources/myapp.css
    myapp/resources/logo.svg
    dojo/dojo.js
    dojo/resources/blank.gif
    dijit/themes/claro/form/images/buttonArrows.png
)
for file in ${FILES[*]}; do
    mkdir -p $MINIMAL_DIST_DIR/`dirname $file`
    cp $DISTDIR/myapp/$file $MINIMAL_DIST_DIR/$file
done

( myapp.css @imports dojo.css .., CSS .)

+1

, , , , dojo.

, dojo, dijit dojox . , , .

, , - , , , destLocation.

, script

packages: [
        {
          name: "dojo", 
          location: "./dtk/dojo",
          destLocation: '../directory/outside/of/codebase/dojo'
        },
        {
          name: "dijit", location: "./dtk/dijit", 
          destLocation: '../directory/outside/of/codebase/dijit' },
        {
          name: "dojox", 
          location: "./dtk/dojox", 
          destLocation: '../directory/outside/of/codebase/dojox'
        },
        { 
          name: "applayer", 
          location: "./location/of/my/release/folder/", 
          destLocation: './' 
        }
    ],

, , , . , - , .

, , , dojo, require.cache, . , , ().

0

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