Commit 2ed8f26
committed
fix: don't restart application when lazy loaded code is changed in angular app with uglify option
Currently CLI has a logic to restart the application when one or more of the emitted files from webpack compilation is not hot update. When a lazy loaded code is changed in angular application and uglify option is provided, CLI always restarts the application. (as 0.js, 1.js are reported as changed). This happens due to the fact that CLI omits entry point files and runtime files from emitted files to check if all rest files are hot updates. As the lazy loaded chunks (`0.js`, `1.js`) are neither entry point files nor runtime files, they are not omitted and CLI decides that there is file that is not hot update and restarts the application. This PR changes this behavior and respects only chunk files from webpack compilation. Chunk files are all files except hot update files. Chunk files are: `runtime.js`, `tns_modules/inspector-modules.js`, `bundle.js`, `vendor.js` and all lazy loaded modules.1 parent 3cabd7e commit 2ed8f26
File tree
2 files changed
+5
-9
lines changed- lib/services/webpack
2 files changed
+5
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
| 221 | + | |
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
| 226 | + | |
| 227 | + | |
231 | 228 | | |
232 | 229 | | |
233 | 230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| |||
0 commit comments