To fix this issue You only need to use "shim" config if the library does not already call define() to declare a module. jQuery does this already, so you can remove that from the shim config. The above code will work as is, but the exports shim config for jQuery will be ignored since jQuery will call define() before the shim work is done. The downsides with the shim vs having the script call define() to define a module:
Any of those help We shim because modules like jQuery and Backbone do not work in the RequireJS model .There is no define( statement defining them so they must be shimmed to work like and with real Require modules directly. Yes, what you said (just dumping them in the global namespace) works, you're not breaking any 'rules'. When you add a script tag all it does is dump the code in the global namespace - so all your modules will, in fact have access to Backbone and jQuery in the above example.
Hope that helps I'm trying to get a jQuery plugin working properly with RequireJS, when using jQuery in the noconflict/noglobal state to force all modules to indicate whether they require jQuery. However, for non-AMD-friendly plugins, the shim config seems to not be working. Namely, if a jQuery plugin is defined with a wrapper like: , Just use