When I npm install jquery, node_module had an additional jquery folder.
But how do you refer to jquery.js in the view?
Jquery is generally referenced on views < scriptsrc ='./js/jquery.js' > </script >
I didn’t ask until I couldn’t find a solution.
On the route
var $ = require("jquery")Only $,can be used on the current file.
However, the $ object cannot be found in views. do you have to use the script tag to import it
jqueryIs to use
commonjsNormative, it is not directly usable in self-executing functions after packaging, so it cannot be directly placed in
scriptUsed in labels. You need to use