Here is my require.js load file:
require.config({
urlArgs: "noCache=" + (new Date).getTime(),
paths: {
jquery: "vendor/jquery-1.8.2.min",
bootstrap: "vendor/bootstrap.min",
underscore: "vendor/underscore-min",
backbone: "vendor/backbone-min",
template: "libs/template"
}
});
require(["jquery", "bootstrap", "underscore", "backbone", "template", "main"],
function ($, bootstrap, underscore, backbone, template, main) {
})
And inside the main.js file I have the following code:
define(["jquery", "underscore", "backbone"], function ($, _, Backbone) {
//Backbone and _ are undefined here, why?
})
So why ,,_" and ,,Backbone" are undefined here, what am I doing wrong?
How to properly use them inside other files?