美文网首页
vue引入bootstrap报错 jQuery is not d

vue引入bootstrap报错 jQuery is not d

作者: 前端啊啊 | 来源:发表于2018-11-13 11:30 被阅读0次

webpack.base.conf.js

const webpack = require('webpack')
module.exports = {
...
 plugins: [
    new webpack.ProvidePlugin({
     $: "jquery",
     jQuery: "jquery"
    })
   ]
}

入口函数 main.js中

import $ from 'jquery'
import 'bootstrap/dist/css/bootstrap.min.css'
import 'bootstrap/dist/js/bootstrap.min.js'

相关文章

网友评论

      本文标题:vue引入bootstrap报错 jQuery is not d

      本文链接:https://www.haomeiwen.com/subject/duvkfqtx.html