Do I have to write wrappers for each jQuery plugin I am trying to use in require.js? I can't user the order plugin they still give me the error that they depend on jQuery.
Thanks
Do I have to write wrappers for each jQuery plugin I am trying to use in require.js? I can't user the order plugin they still give me the error that they depend on jQuery.
Thanks
Share Improve this question asked May 29, 2012 at 12:38 onlineracoononlineracoon 2,9705 gold badges48 silver badges66 bronze badges 1- Could you explain more? Examples of the plugins you're trying to use and how you're bining them would be useful. It's worth noting that all jQuery plugins will obviously require a jQuery include somewhere on the same page, if that's the problem you're having. – Death Commented May 29, 2012 at 12:41
2 Answers
Reset to default 11RequireJS 2.0 has a shim
option that allows you to use older non-AMD scripts as modules - http://requirejs/docs/api.html#config-shim
Have you read How to use require js with jquery? It explains that you can use require js to load jquery and jquery plugins by using a bined jquery/requirejs file. You can find a sample project here. There are also several alternative strategies listed in the sample project's readme.