Commit b811100
committed
refactor(@angular/build): add initial component HMR source file analysis
When component template HMR support is enabled (`NG_HMR_TEMPLATES=1`),
TypeScript file changes will now be analyzed to determine if Angular component
metadata has changed and if the changes can support a hot replacement. Any
other changes to a TypeScript file will cause a full page reload to avoid
inconsistent state between the code and running application. The analysis
currently has an upper limit of 32 modified files at one time to prevent
a large of amount of analysis to be performed which may take longer than
a full rebuild. This value may be adjusted based on feedback. Component
template HMR is currently experimental and may not support all template
modifications. Both inline and file-based templates are now supported.
However, rebuild times have not yet been optimized.1 parent e4448bb commit b811100
File tree
2 files changed
+329
-46
lines changed- packages/angular/build/src/tools/angular/compilation
2 files changed
+329
-46
lines changedLines changed: 15 additions & 46 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
22 | 30 | | |
23 | 31 | | |
24 | 32 | | |
| |||
66 | 74 | | |
67 | 75 | | |
68 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
69 | 82 | | |
70 | 83 | | |
71 | | - | |
| 84 | + | |
72 | 85 | | |
73 | 86 | | |
74 | 87 | | |
| |||
107 | 120 | | |
108 | 121 | | |
109 | 122 | | |
110 | | - | |
| 123 | + | |
111 | 124 | | |
112 | 125 | | |
113 | 126 | | |
| |||
432 | 445 | | |
433 | 446 | | |
434 | 447 | | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
0 commit comments