ERROR Invalid options in vue.config.js: “plugins“ is not allowed
ERRORInvalid options in vue.config.js: “plugins” is not allowed问题描述:在导入jQuery的时候,没找到index.js,就直接在vue.config.js中添加了,出现的下面的错误原因:未知解决方法:在外层加上configureWebpackconst path = require('path')var webpack = requ
·
问题描述:
在导入jQuery的时候,没找到index.js
,就直接在vue.config.js
中添加了,出现的下面的错误
原因:未知
解决方法:
在外层加上configureWebpack
const path = require('path')
var webpack = require('webpack')
function resolve(dir) {
return path.join(__dirname, dir)
}
module.exports = {
configureWebpack: {
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery",
"windows.jQuery": "jquery"
})
]
}
}
更多推荐
已为社区贡献23条内容
所有评论(0)