预 (AOT) 编译器
https://angular.cn/docs/ts/latest/cookbook/aot-compiler.html
To run your app in AoT mode, all that’s required is changing your main.ts file from
import {platformBrowserDynamic} from ‘@angular/platform-browser-dynamic’
import {MyAppModule} from ‘./app’
platformBrowserDynamic().bootstrapModule(MyAppModule);
to
import {platformBrowser} from ‘@angular/platform-browser’
import {MyAppModuleNgFactory} from ‘./app.ngfactory’ //generated code
platformBrowser().bootstrapModuleFactory(MyAppModuleNgFactory);
有关NPM的问题可以看
https://github.com/npm/npm/issues
webpack+aot starter @ngtools/webpack插件
https://github.com/wuzhouyang/angular2-webpack-aot-lazyload-starter