Error:Rule can only have one resource source

 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"

上一篇:蓝桥杯--算法训练 集合运算


下一篇:Scala Reduce操作(简化归约)reduce和fold