I need to make sure that a plugin will not load until its dependency loads using RequireJS

I need to make sure that a plugin will not load until its dependency loads using RequireJS

I am using the jquery.validationEngine.js plugin. jqueryValidateEnglish cannot run unless jqueryValidateEngine is loaded first.

My jquery.wrapped.validationEnglish2.js is coded like the following:

 define(['jqueryValidateEngine'],function($){ //Plugin Code here });


My jquery.wrapped.validationEngine2.js is coded like the following:

 define(['jquery'],function($){ //Plugin Code here });


My homepage contains:

 <script src="/imagesrv/marketing/requireJS/assets/lib/require.js" data-main="/imagesrv/marketing/requireJS/assets/js/common2">


common2.js Contains:

 //Configure RequireJS require.config({ baseUrl: "/imagesrv/marketing/requireJS/assets", paths: { // The libraries we use jquery: [ '/imagesrv/marketing/js/jquery.min' ], bootstrap: '/imagesrv/marketing/requireJS/assets/lib/bootstrap.wrapped.min', smartdevice: '/imagesrv/marketing/requireJS/assets/page/smart-device', eloquatag: '/imagesrv/marketing/requireJS/assets/page/eloqua-tag', main: '/imagesrv/marketing/requireJS/assets/page/main', startupkit: '/imagesrv/marketing/requireJS/assets/js/startup.wrapped.kit', jqueryuicus: '/imagesrv/marketing/requireJS/assets/js/jquery-wrapped.ui-1.10.3.custom.min', smoothscrl: '/imagesrv/marketing/requireJS/assets/js/jquery.smoothdivscroll.wrapped-1.3-min', genscript: '/imagesrv/marketing/requireJS/assets/js/gen-wrapped.menu.script', owlcarousel: '/imagesrv/marketing/requireJS/assets/js/owl.wrapped.carousel', placeholder: '/imagesrv/marketing/requireJS/assets/js/jquery.wrapped.placeholder', explorewhatshot: '/imagesrv/marketing/requireJS/assets/js/explorewhatshot.wrapped', kiblog: '/imagesrv/marketing/requireJS/assets/js/ki.wrapped.blog.script', jqueryValidateEnglish: '/imagesrv/marketing/requireJS/assets/js/jquery.wrapped.validationEnglish2', jqueryValidateEngine: '/imagesrv/marketing/requireJS/assets/js/jquery.wrapped.validationEngine2' } }); 

require(['main', 'bootstrap', 'startupkit', 'eloquatag', 'owlcarousel', 'kiblog', 'jqueryuicus', 'jqueryValidateEnglish'], function($) {// Load up this pages script, once the 'common' script has loaded console.log('jQuery and r.js have been loaded!'); });


But I keep getting the following error in the console when I run my page: "$(...).validationEngine is not a function


When I look under Network it shows that my wrapped plugins are loading but for some reason it seems like they must be loading out of order which is probably why I am getting the console error.


I am not sure what the issue is.