The project built using vue-cli prompts "loaderContext.getResolve is not a function" in the configuration of less
Problem Description
In the webpack project created by using vue cli, I want to configure less preprocessing. After the configuration is completed, the error message "loaderContext.getResolve is not a function" appears, as follows.
Cause of the problem
The version of less installed is too high, and the versions of less and less-loader are as follows.
Solution
Directly modify the version number of less in the package.json file, and re-npm install the dependent package. The modified less version number is as follows.
Reference address
Portal 1
Portal 2