About using webpack to package vue projects, the local compilation speed is very slow.

our project uses the vue.js framework, packaged in webpack, has more than 150 components, and is particularly slow to run the npm run dev command locally. The following is a screenshot of compilation time:


there are some optimization ideas. I don't know if they are suitable for your project

  1. build using happyPack, multiprocess
  2. split public files into webpack external. It is not necessary to compile
  3. every time.
  4. enable tree-shaking and compress processes
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36747-2c00b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36747-2c00b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?