Jquery bootstrap introduced in vue project
Introduced jquery
npm install jquery --save-dev
In the build / webpack.base.conf.js file in the root directory of the project:
var webpack = require("webpack")
Finally, write in the module.exports
plugins: [
new webpack.optimize.CommonsChunkPlugin('common.js'),
new webpack.ProvidePlugin({
jQuery: "jquery",
$: "jquery"
}) ]
Introduced under the root directory srcmain.js
import $ from 'jquery'
Introducing bootstrap
I use local references in assets in
import './assets/css/bootstrap.css'
import './assets/js/bootstrap.js'