ERROR Error: Rule can only have one resource source (provided resource and test + include + exc
lude) in {
"type": "javascript/auto",
"include": [
{}
],
"use": []
}
如果直接npm i -D webpack,则安装的是webpack@5,但是vue-cli依赖于webpack@4,所以会报错。
解决:
npm un -D webpack 卸载webpack
重新安装并指定版本,或者直接在package.json中添加:"webpack":"4.23.0"