1.安裝jquery npm install jquery --save-dev 2.打開配置文件webpack.base.conf.js 加入'jquery': path.resolve(__dirname, '../node_modules/jquery/src/jquery') //引入jqu ...
1.安裝jquery
npm install jquery --save-dev
2.打開配置文件webpack.base.conf.js
加入'jquery': path.resolve(__dirname, '../node_modules/jquery/src/jquery') //引入jquery
3.main.js中引用jquery
import $ from "jquery"
4.測試
列印成功~引用成功