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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:48:20+00:00 2026-05-31T23:48:20+00:00

JavaScript libaries such as RequireJS and the like can be used to declare one

  • 0

JavaScript libaries such as RequireJS and the like can be used to declare one or more dependencies of a certain JavaScript file.

For example, the actual code of a JavaScript file a.js may be wrapped like so:

a.js

require(["b"], function(b) {
   // actual code using logic declared in b.js
});

We can then use logic declared within b.js, a separate file.

Question:

Is it possible to define this dependency in a third file, c.js, maybe an application-wide config file defining all dependencies of the application, but allowing a.js to use logic of b.js the same way as it would be defined in the way as shown above?

It’s probably not possible with RequireJS, but is there a different library which supports this use case (assuming it’s technically possible given the nature of the language)?

  • 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-31T23:48:21+00:00Added an answer on May 31, 2026 at 11:48 pm

    I wouldn’t use RequireJS for this, but nCore.

    It does exactly what you want, using a dependency.json file. Also, it “compiles” your js files into one for production.

    You can see an example of application here (look at the modules/ folder).

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

Sidebar

Related Questions

What Javascript libraries can you recommend for syntax highlighting <code> blocks in HTML? (One
Are there javascript libraries that provide forward compatibility with particular implementations? For example, such
Can we use OpenCV from Javascript? Is there such implementation? Is there any JS
I'm looking for a barebones javascript example that demonstrates how the javascript plugin architecture
I used to find a website with many good and small javascript libraries, but
I'm looking for advice/opinions on Javascript control libraries like ext-js, dhtmlx, jquery-UI etc... I've
I would like to ask how other more experienced Coffeescript developers are using their
I am searching through drag & drop sortable Javascript libraries such as Prototype's sortable,
Been using Javascript libraries like Prototype and jQuery for development, for a while now.
Quite often see in JavaScript libraries code like this: setTimeout(function() { ... }, 0);

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.