When seajs is used, the following error occurs: Uncaught ReferenceError: $ is not defined, seajsuncaught.
This problem does not occur when jquery is referenced when seajs is not modularized.
Later, when using seajs for modularization and introducing the jquery plug-in, the following errors were reported:
1. The file path in the jquery library is incorrect. You can solve this problem by checking whether the file path is correct.
2. If the path of the library file is correct, the sequence of loading jquery library files in html may be incorrect. If you load the jquery library file to the initial position, this error can be solved.
Then I put the jquery library file in html, but I still want to use seajs to manage jquery and don't want to expose jquery to the outside. So I used the following method:
Write in the module file:
Window. jQuery = window. $ = require ("jquery ");
I tried it. It is feasible. I don't know if you have any better solutions.