在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
以上就是angular8 打包时 文件过大 导致内存溢出解决方案(记录)的全部内容。