Error:Rule can only have one resource source [How to Solve]

 ERROR  Error: Rule can only have one resource source (provided resource and test + include + exc
lude) in {
“type”: “javascript/auto”,
“include”: [
{}
],
“use”: []
}

If NPM I – D webpack is directly installed, the webpack@5 However, Vue cli depends on webpack@4, so it will report an error.

Solution:

NPM un – D webpack uninstall webpack

Or install the version directly in package JSON: “webpack”: “4.23.0”

Similar Posts: