angular8 package when the file is too large lead to memory overflow solution (Record)

Add in the package.json

"scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "buildTest": "ng build --build--optimizer --aot ",
    "buildProd":"node --max-old-space-size=8000 node_modules\\@angular\\cli\\bin\\ng build --prod --build--optimizer --aot",
    "e2e": "ng e2e"
  },

  

"buildProd":"node --max-old-space-size=8000 node_modules\\@angular\\cli\\bin\\ng build --prod --build--optimizer --aot",

使用
npm run buildProd

Guess you like

Origin www.cnblogs.com/MainActivity/p/11498027.html