配置
下载
shell
npm install jquery --save
在build的webpack.base.conf中
javascript
var webpack=require("webpack")

在module.exports中:
javascript
plugins: [
// new webpack.optimize.CommonsChunkPlugin('common.js'),
new webpack.ProvidePlugin({
jQuery: "jquery",
$: "jquery"
})
],

使用
在具体页面的script中引入:
javascript
import $ from 'jquery'