我正在参与一个相当大的项目,使用 Angular 2 和 Angular 2 CLI beta 21。我目前对编译时间和更新时间感到惊讶。
以下是 ng serve 命令的输出结果。耗时为44.8秒。
以下是 ng serve 命令的输出结果。耗时为44.8秒。
$:ng serve
** NG Live Development Server is running on http://localhost:4200. **
32398ms building modules
94ms sealing
0ms optimizing
0ms basic module optimization
85ms module optimization
2480ms advanced module optimization
596ms basic chunk optimization
0ms chunk optimization
0ms advanced chunk optimization
1ms module and chunk tree optimization
284ms module reviving
5ms module order optimization
14ms module id optimization
273ms chunk reviving
7ms chunk order optimization
1036ms chunk id optimization
89ms hashing
3ms module assets processing
262ms chunk assets processing
27ms additional chunk assets processing
0ms recording
0ms additional asset processing
6836ms chunk asset optimization
188ms asset optimization
110ms emitting
Hash: 3bbcf7a50e73f9e25b19
Version: webpack 2.1.0-beta.25
Time: 44809ms
然后我改变了一个字符串中的单个字符。23.38秒。
webpack: bundle is now INVALID.
5111ms building modules
770ms sealing
0ms optimizing
0ms basic module optimization
64ms module optimization
3221ms advanced module optimization
951ms basic chunk optimization
0ms chunk optimization
0ms advanced chunk optimization
1353ms module and chunk tree optimization
317ms module reviving
4ms module order optimization
15ms module id optimization
302ms chunk reviving
4ms chunk order optimization
941ms chunk id optimization
88ms hashing
2ms module assets processing
117ms chunk assets processing
5ms additional chunk assets processing
0ms recording
1ms additional asset processing
5064ms chunk asset optimization
161ms asset optimization
75ms emitting
Hash: f159d87ee84758d5672b
Version: webpack 2.1.0-beta.25
Time: 23381ms
我知道这些不是正常的...... 可能吗?
如果不正常(我希望不是),我做错了什么?有没有办法改善这些时间?
非常感谢。