当前位置: 代码迷 >> 综合 >> vue cli 3 引入 使用jQuery
  详细解决方案

vue cli 3 引入 使用jQuery

热度:71   发布时间:2023-10-10 19:13:04.0
// 安装jquery
npm install jquery --save// 打开.eslintrc.js 添加
module.exports = {env: {jquery:true}
}// 打开vue.config.js 文件 添加
const webpack = require('webpack')
module.exports = {configureWebpack: {plugins: [new webpack.ProvidePlugin({$: "jquery",jQuery: "jquery","windows.jQuery": "jquery"})]},
}

 

  相关解决方案