TypeError: loaderContext.getResolve is not a function The solution to the error report, common to less and sass (yarn and npm)

Generally, it is caused by version incompatibility, just lower the version. The specific steps are as follows:
From the figure, it can be seen that the error is caused by lessLoader.
insert image description here
I am using yarn.

yarn add less-loader@5.0.0

npm is as follows:

 npm uninstall less-loader
 npm install less-loader@5.0.0

(If it is caused by sassLoader, you can change the above code lessto sass)

Guess you like

Origin blog.csdn.net/qq_41612593/article/details/122299308
Recommended