* Brings the necessary hydration code in tree-shakable manner. * The code is only present when the `provideClientHydration` is * invoked. Otherwise, this code is tree-shaken away during the * build optimization step. * * This technique allows us to swap implementations of methods so * tree sha
()
| 95 | * supports hydration only when enabled. |
| 96 | */ |
| 97 | function enableHydrationRuntimeSupport() { |
| 98 | if (!isHydrationSupportEnabled) { |
| 99 | isHydrationSupportEnabled = true; |
| 100 | enableRetrieveHydrationInfoImpl(); |
| 101 | enableLocateOrCreateElementNodeImpl(); |
| 102 | enableLocateOrCreateTextNodeImpl(); |
| 103 | enableLocateOrCreateElementContainerNodeImpl(); |
| 104 | enableLocateOrCreateContainerAnchorImpl(); |
| 105 | enableLocateOrCreateContainerRefImpl(); |
| 106 | enableFindMatchingDehydratedViewImpl(); |
| 107 | enableApplyRootElementTransformImpl(); |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | /** |
| 112 | * Brings the necessary i18n hydration code in tree-shakable manner. |
no test coverage detected
searching dependent graphs…