Angular 2 AOT build error - JavaScript heap out of memory
问题 My Angular 2 app is generated by angular2-webpack-starter. When I run command npm run build:aot to build AOT package, the console shows the following error message: ..... 92% chunk asset optimization 500690 ms: Mark-sweep 1290.1 (1421.8) -> 1290.1 (1437.8) MB, 1219.8 / 0.0 ms [allocation failure] [GC in old space requested]. 501898 ms: Mark-sweep 1290.1 (1437.8) -> 1290.1 (1437.8) MB, 1207.9 / 0.0 ms [allocation failure] [GC in old space requested]. 503171 ms: Mark-sweep 1290.1 (1437.8) ->