更新 Angular 2 代码需要很长时间

Update Angular 2 code take so long

我的开发效率下降,因为更新浏览器页面需要将近 8 秒。 angular-cli 在更新 html 或 ts 代码后重新编译应用程序时速度缓慢。 - [WDS] 应用更新。正在重新编译... - 是否有一些解决方案可以使其更快?

您可以使用热模块替换https://github.com/AngularClass/angular2-hmr it'll recompile only changed files, not all files. The best place to go with hmr - this sample seed app https://github.com/AngularClass/angular2-seed or more complex seed app https://github.com/AngularClass/angular2-webpack-starter