You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(core): produce a message about @defer behavior when HMR is enabled
When the HMR is enabled in Angular, all `@defer` block dependencies are loaded
eagerly, instead of waiting for configured trigger conditions. From the DX perspective,
it might be seen as an issue when all dependencies are being loaded eagerly. This commit
adds a logic to produce a message into the console to provide more info for developers.
Hot Module Replacement (HMR) is a technique used by development servers to avoid reloading the entire page when only part of an application is changed.
4
+
5
+
When the HMR is enabled in Angular, all `@defer` block dependencies are loaded
6
+
eagerly, instead of waiting for configured trigger conditions (both for client-only and incremental hydration triggers). This is needed
7
+
for the HMR to function properly, replacing components in an application at runtime
8
+
without the need to reload the entire page. Note: the actual rendering of defer
9
+
blocks respects trigger conditions in the HMR mode.
10
+
11
+
If you want to test `@defer` block behavior in development mode and ensure that
12
+
the necessary dependencies are loaded when a triggering condition is met, you can
13
+
disable the HMR mode as described in [`this document`](/tools/cli/build-system-migration#hot-module-replacement).
0 commit comments