vue2 project modification and compilation are extremely slow

Foreword: After giving one of our Vue projects to a new colleague, he said that the compilation was very slow. It took 5 minutes for a small modification to be automatically compiled successfully. When I put the project on a new computer, it was also extremely slow. I upgraded nodejs and it worked better, but It was still slow, but after introducing webpack, it became extremely fast.

It takes less than two seconds to introduce webpack in the project's package.json, hahaha

  "dependencies": {
    ...
    "webpack": "^4.4.1",
    "xe-utils": "2.4.8",
    "xmldom": "^0.1.27"
  },



 "devDependencies": {
     ...
    "vue-template-compiler": "^2.6.10",
    "webpack-cli": "^5.1.4"
  }

Guess you like

Origin blog.csdn.net/zhaofuqiangmycomm/article/details/134443098