underscore666
underscore666

Reputation: 1739

Requirejs, how can I deal with baseUrl

I am using require.js just for loading not third party javascripts modules.
So the baseUrl will point to this directory.
Let's suppose I would like to load also an extLib dynamically,
which is located in a different directory.

How can I fix this without rewriting the current baseUrl?

baseUrl: "js"

define([
   "myLib1",
   "myLib2",
   "extLib" // <-- lib which is located in a different baseDir 
], function () {
});

Upvotes: 1

Views: 3289

Answers (1)

jrburke
jrburke

Reputation: 6766

Use a paths config to set the path for extLib: http://requirejs.org/docs/api.html#config

Upvotes: 2

Related Questions