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 7536027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:27:44+00:00 2026-05-30T06:27:44+00:00

In an Dojo 1.7 AMD web app you can define also arbitrary data in

  • 0

In an Dojo 1.7 AMD web app you can define also arbitrary data in the config object (http://dojotoolkit.org/reference-guide/loader/amd.html).

The configuration object can also be used to set arbitrary, application-specific configuration data. All properties of a configuration object are shallow copied to require.rawConfig

I looked to the requirejs config page (http://requirejs.org/docs/api.html#config), but I did not find a similar feature here. But I did not look into the source code.

Is there a possibility to store arbitrary infos in the requirejs config and get access to it?
Thanks alot in advance
Wolfgang

  • 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-05-30T06:27:46+00:00Added an answer on May 30, 2026 at 6:27 am

    As far as I can see it is not supported.
    You need to insert 1 line in the require.js source code to get this feature.

    Here is an example:

    require.config({
      test: "one",
      paths: {
        'jquery': 'libs/jquery/1.7.1/jquery',
    ...
    

    Along with the normal values you store your arbitrary information.

    Then, you have to open the requirejs source code with a text editor.
    Approximately in line 380 – 390 (depends on your version), function “makeRequire”:
    This function calls another called “mixin”:

     mixin(modRequire, {
                nameToUrl: makeContextModuleFunc(context.nameToUrl, relModuleMap),
                toUrl: makeContextModuleFunc(context.toUrl, relModuleMap),
                defined: makeContextModuleFunc(context.requireDefined, relModuleMap),
                specified: makeContextModuleFunc(context.requireSpecified, relModuleMap),
                isBrowser: req.isBrowser,
                rawConfig: config
            });
    

    After “isBrowser” write “rawConfig: config”.

    Now, in your amd module:

    define(['require'], function (require){
      alert (require.rawConfig.test);
      ...
    

    Update:
    This feature will be implimented in requirejs 1.1.
    https://github.com/jrburke/requirejs/issues/182

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Dojo has this: http://download.dojotoolkit.org/release-0.4.3/dojo-0.4.3-widget/tests/widget/test_Select.html Similar to Google Auto-suggest. Does jQuery have anything similar?
dojo.addOnLoad(function(){ var jsonStore = new dojo.data.ItemFileReadStore({url:http://localhost:8080/Sai/samu}); }); <div dojoType=dijit.form.FilteringSelect store=jsonStore required=true id=MyId ></div> I
I have a dojo.data.ItemFileWriteStore object with items which contain a 'children' attribute, which in
I'm building a Dojo DataGrid from JSON data provided by my REST interface. The
I am upgrading a project from Dojo 1.6.1 using AMD and RequireJS to Dojo
I've created a widget which I want to load via AMD in dojo 1.7.
I am using google's CDN and also trying to load my own AMD modules
I am using a Dojo Datagrid connected to a dojo.store.JsonRest through an dojo.data.ObjectStore and
I am using dojo datagrid to display my data. When the end user edit
I want to use dojo doxox/dtl in AMD, OUTSIDE OF A WIDGET! Currently (2012-02-10)

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.