1. cnpm install jquery --save
2. 在build/webpack.base.conf.js 增加const webpack = require('webpack')和plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
jquery: 'jquery',
'window.jQuery': 'jquery',
jQuery: 'jquery'
}),
],
1. cnpm install jquery --save
2. 在build/webpack.base.conf.js 增加const webpack = require('webpack')和plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
jquery: 'jquery',
'window.jQuery': 'jquery',
jQuery: 'jquery'
}),
],