javascript - Compiled requirejs modules require calls are executing before modules are defined resulting in 'Undefined is not a function' -


i've compiled requirejs file using r.js , on page load, modules aren't defined (i'm assuming) require , define calls running asynchronously , modules aren't getting defined time require call has executed.

i'm pretty sure shim correct, waitseconds set 0 (infinite) , exports set up.

here's (shortened) requirejs file:

requirejs.config({         defaultpath: 'javascript',     waitseconds: 0,     // paths plugins     paths   :   {         'jquery'              :   'plugins/jquery-1.9.1.min',         'owl'                 :   'plugins/owl.carousel.min'     },     // dependency order if applicable     shim    :   {         'jquery'              :   {             exports: '$'         },         'owl'                 :   {             deps: ['jquery'],             exports: 'owlcarousel'         }     }   });  require(['jquery','owl'], function($, owlcarousel){     $('.carousel').owlcarousel(); }); 


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -