I'm getting an undefined error from a new library I just plugged in to requireJS. I know the undefined error is related with the 'wNumb' module not loading before is used. If I load 'wNumb' module in config.js like this: require(['main', 'wNumb']); everything works.
// conifg.js
require.config({
paths: {
'main': 'main',
'socketio': './libs/socket.io/socket.io',
'plotly': './libs/plotly/plotly-latest.min',
'renderDataToPlotly': './scripts/renderDataToPlotly',
'noUISlider': './libs/noUiSlider.8.5.1/nouislider.min',
'wNumb': './libs/wnumb-1.0.2/wNumb',
'sliders': './scripts/sliders',
'makePlotlyWindowResponsive': './scripts/makePlotlyWindowResponsive'
}
});
require(['main']);
// main.js
define([
'socketio',
'sliders', //---------------------------------------------> NOTE: sliders.js loading here
'makePlotlyWindowResponsive',
'renderDataToPlotly'
],
function(io, sliders, makePlotlyWindowResponsive, renderDataToPlotly) {
//
}
);
// sliders.js
define(['noUISlider', 'wNumb'], function(noUISlider, wNumb) {
console.log(wNumb); // ---------------------------------------------------> undefined
});
Question: Why is this happening? Should not 'wNumb'have been loaded by the time console.log(wNumb); executes?
Thank you


'wNumb'exported nothing, placing it inconfig.jsinside therequire(['main', 'wNumb']);would not make a difference, but it does in deed.noUISlidervariable ?