(
serializedBundleGraph?: (string | number)[],
opts?: {
debug?: boolean;
preloadProbability?: number;
}
)
| 119 | |
| 120 | /** Used during SSR */ |
| 121 | export const initPreloader = ( |
| 122 | serializedBundleGraph?: (string | number)[], |
| 123 | opts?: { |
| 124 | debug?: boolean; |
| 125 | preloadProbability?: number; |
| 126 | } |
| 127 | ) => { |
| 128 | if (opts) { |
| 129 | if ('debug' in opts) { |
| 130 | config.$DEBUG$ = !!opts.debug; |
| 131 | } |
| 132 | if (typeof opts.preloadProbability === 'number') { |
| 133 | config.$invPreloadProbability$ = 1 - opts.preloadProbability; |
| 134 | } |
| 135 | } |
| 136 | if (base != null || !serializedBundleGraph) { |
| 137 | return; |
| 138 | } |
| 139 | base = ''; |
| 140 | graph = parseBundleGraph(serializedBundleGraph); |
| 141 | }; |
no test coverage detected
searching dependent graphs…