解決Vue編譯和打包時頻繁內存溢出情況CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
如上圖所示:頻繁出現此種情況,項目太大,導致內存溢出,排除代碼問題外,可參照以下方式解決
第一步: 全局安裝 increase-memory-limit
npm install -g increase-memory-limit
第二步: 進入工程目錄,執行:
increase-memory-limit
第三步: 重啟項目即可(切記!!!)
npm run dev
第四步: 完美解決!!!
可以的話點贊吧!!!