Why can you directly import? after npm install jquery in vue

jquery is not a modular class library, but why can import $from "jquery" be used directly after npm install?

Mar.18,2022

jq makes exports easy to do


if methods are exposed through module.exports , they can be called through import , which is not difficult. As soon as I read the 1.10.0 version, I am compatible with


.

webpack/babel will compile your ES6 module import method.

jquery export
module.exports = xxx

corresponding can be introduced as follows:
import $from 'jquery'

after compilation, it is actually introduced like this:
var $= require ('jquery')


npm install after Jquery is in your project node_modules . When you import , it will go to node_modules to find Jquery , module.exports derived from Jquery , so you can get

when you import .
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3ecb0-2bc95.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3ecb0-2bc95.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?