在webpack.
base
.conf.js里加入
var
webpack = require(
"webpack"
)
在module.exports的最后加入
plugins: [
new
webpack.ProvidePlugin({
jQuery:
"jquery"
,
$:
"jquery"
})
]
然后一定要重新npm run dev
在main.js 引入就ok了import $
from
'jquery'
在webpack.
base
.conf.js里加入
var
webpack = require(
"webpack"
)
在module.exports的最后加入
plugins: [
new
webpack.ProvidePlugin({
jQuery:
"jquery"
,
$:
"jquery"
})
]
然后一定要重新npm run dev
在main.js 引入就ok了import $
from
'jquery'