An error is reported when the less file is introduced into main.js

Today, in a Vue project, I planned to modify the theme of vant, and then an unexpected error occurred. I introduced the less file into main.js, and an error was reported when the project was started.

After looking for the reason, I didn’t find out. Then I tried on the previous old project. From here, I can know that it must be the reason for the version of something. Finally, I found that it is the scaffolding. The new version of Vue cli has helped us configure the less loader and put it in util.js, We just need to modify the webpack.base.conf.js file under the build file, delete or comment out this code, and the project can run normally.

Read More: