I have a problem with requirejs and a dependency being undefined.
My setup is the following:
var lib = function (){...};
define(function() {
return lib;
});
And the modules are define like this
var mod = function (){
...
lib('para') ...
};
define(["lib/lib"], function(lib) {
return mod;
});
In my main.js I have this
require(['lib/lib'], function(lib){
lib('para').mod();
})
The Problem: Lib is available in main.js but for mod I get an error Uncaught ReferenceError: lib is not defined