Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8412109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:35:38+00:00 2026-06-10T00:35:38+00:00

I studied the build tutorial , found the web build (1.7.2 only), and tested

  • 0

I studied the build tutorial, found the web build (1.7.2 only), and tested several examples – however, I could not find an easy explanation of the build system.

Let’s say my app is a single web page:

<script src="./js/App/other_non_amd_stuff_working_independently.js">
<script src="./js/lib/dojo/dojo.js" data-dojo-config="async: true"></script>
<script src="./js/App/Main.js">

The Dojo SDK is in ./lib/, Main.js contains the Dojo config + app boot:

require({
    packages:[{
        name:"App",
        location:"../../App"
    }]
},  
[ "dojo/query",
  "dijit/layout/BorderContainer", 
  "App/Foo",
  "dojo/domReady!"], function(query, BorderContainer, Foo) { ... });

My question now is as simple as this: How can I create one single script file out of all my Dojo/AMD stuff? I just want to replace

<script src="./js/lib/dojo/dojo.js" data-dojo-config="async: true"></script>
<script src="./js/App/Main.js">

with a single

<script src="./js/Main.minified.js">

Getting the build system to work on this seems somewhat non-trivial. It either trys to convert all files in ./App/ to AMD modules (that’s not what I want .. yet) or fails to find App/Main. I tried building a build profile (app.profile.js), but I don’t get the point of this except that it’s adding (IMO unnecessary) complexity. How can I make the build system just concatenate my App/Main.js incl. dependencies ?

Any hints for better tutorials on understanding the build system are appreciated, too.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T00:35:40+00:00Added an answer on June 10, 2026 at 12:35 am

    See this QnA for building your layer into the dojo.js file. I might as well share my experiences, as it has taken me a few trial and errors to get my bootstraps working properly. Actually the answer is easily found within the ‘dojosdk/util/buildscripts/profiles/baseplus.profile.js’ file.

    Dojo Custom Build 1.6 into a single file (same setup as new buildsystem, may still undergo a few changes for 2.0 though)

    Howto create main application layer sutured together with dojo.js

    dependencies ={
      layers:  [
          {
          name: "dojo.js", // overwrites regular dojo.js and ++'s your layer
          dependencies: [
             "app.main"
          ]
      }
    }
    

    Remember to prefix locations properly

    Since youre having the ‘App’ module placed outside the dojo SDK root, the same would need to be applied as you assign packages in dojoConfig. The attribute key though, is instead prefixes for a layer profile.

    prefixes: [
        [ "dijit", "../dijit" ],
        [ "dojox", "../dojox" ],
        [ "App", "../../App" ]
    ]
    

    Howto create sub module layer

    You may want to build a sub-module of your App, so that if a popup-dialog for instance requires extra extra – they can be downloaded at runtime in a separate package. To make sure that dependencies, which are allready loaded through your main-module-layer is not included in the sub-module-layer, the attribute key youre looking for is layerDependencies.

    It would look like this for a combined result:

    dependencies ={
      layers:  [
          {
            name: "../dojo/dojo.js", // overwrites regular dojo.js and ++'s your layer
            dependencies: [
             "app.Main"
            ]
          }, {
            name: "../../App/JITModule.js",
            layerDependencies: [
             "../../App/Main"   // tells this layer that the dependencychain in Main is allready loaded (programmer must make sure this is true ofc)
            ]
            dependencies: [
             "App.JustInTimeDialog"
            ]
          }
      ]
      prefixes: [
        [ "dijit", "../dijit" ],
        [ "dojox", "../dojox" ],
        [ "App", "../../App" ]
      ]
    }
    

    This should result in two optimized layerfiles, one with the standard one-line-dojo.js plus a dojo.cache entry, containing the files from your App. Example usage follows. Note, that you still need to call require for any cached modules or they will simply remain in the cache.

    Putting it together in HTML

    NOTE Putting your dojoConfig into the ./js/App/Main.js file will not work as expected, dojo.js regular contents are loaded above the layers.

    <head>
      <script>
         function JITDialog() {
              require([ "App.JITDialog" ], function(dialoglayer)  {
                 var dialog = new App.JustInTimeDialog();
                 dialog.show();
              });
         }
    
         var dojoConfig = {
             async: true,
             packages:[{
                name:"App",
                location:"../../App"
             }]
         }
      </script>
    
      <script src="./js/lib/dojo/dojo.js"></script>
    
      <script>    
         require("App.Main", function() {
            // loads the layer, depending on the structure of App.Main class,
            // you can call your initializations here
            var app = new App.Main();
            app.run();
         });
      </script>
    
    </head>
    <body>
      <button onclick="JITDialog();">
          Download sub-module-layer and show a dialog on user interaction
      </button>
    </body>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I studied the Twitter API Documentation today. Only find that we could use Twitter
I have studied most of the posts concerning web page being viewed in an
I'm starting to build a community website from the site up and my web
I studied several samples, including one here , and basically all I need to
I've studied several Android books in 2009 and have fiddled with SDK 1.0 with
Having studied the switch documentation and discovering it can only switch on integral types
I studied many forums, some of them saying that I am not allowed and
Hi I studied Push notification, and i find out I have to Creating the
I have studied the SMS Messaging in Android from the mobiForge. Nice tutorial. I
As many programmers I studied Prolog in university, but only very little. I understand

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.