标签:bpa strong bsp class rom exports VID imp ali
引入
$ npm install jquery bootstrap --save
jquery
1.加入webpack对象
var webpack = require(‘webpack‘);
2.在module.exports里面引入
plugins: [ new webpack.ProvidePlugin({ $:"jquery", jQuery:"jquery", "windows.jQuery":"jquery" }) ]
3.在入口文件main.js中引入
import $ from "jquery"
全局引入jq
bootstrap
1.修改webpack.base.conf.js 文件:
alias: { ‘vue$‘: ‘vue/dist/vue.esm.js‘, ‘jquery‘: "jquery/src/jquery" },
2.在入口文件main.js中加入:
import ‘../node_modules/bootstrap/dist/css/bootstrap.min.css‘
import ‘../node_modules/bootstrap/dist/js/bootstrap.min‘
标签:bpa strong bsp class rom exports VID imp ali
原文地址:https://www.cnblogs.com/sxgxiaoge/p/9353048.html