After installing the less-loader module directly, the following error may occur:The reason is that when we directly install NPM less-loader, the downloaded version is too high to be compatiblegetOptionsFunction method, this time just need to downgrade the version is good. This will find that there is no error already.
npm uninstall less-loader// Uninstall the current less-loader
Copy the code
npm install less-loader@5.0. 0// Download the specified version of less-loader
Copy the code