Be sure to read " README.md " for the RequireJS + jQuery sample project. There are many complications with using jQuery that you need to decide how best to solve it for your project during the initial setup. Once you have found out what is best for you and implemented it, this should not be a problem again.
Most of the complications are also related to the fact that jQuery is not a true AMD module, they just have a hack in the code base to determine if the function detects the definition. For example, this means that the jQuery module name will always be "jquery" (note the lowercase "q") if you do not wrap it yourself, so if you specify a path for it in your configuration, you MUST have a key with the name "jquery" (again, with lowercase "q") or there will be a mismatch. This is a bit of us when setting up RequireJS for the first time in our project (we named the key "jQuery").
James M. Greene
source share