1

My current set up uses requireJS for module loading and Underscore for its many utility features.

The issue is that the custom mixins I'm adding to Underscore are sometimes unavailable. It seems every other refresh can change this.

Some example pseudo code:

require(['a_module', 'another_module'], function (
    aModule, anotherModule) {
        _.mixin({
            doThing: function () {
                return aModule.doSomething();
            }
        });
 });

So, sometimes I can call _.doThing and other times it just return as undefined. Any thoughts?

If you need any more info let me know!

0

Browse other questions tagged or ask your own question.