()
| 205 | } |
| 206 | |
| 207 | async flush(): Promise<void> { |
| 208 | const preparer = new IslandPreparer(); |
| 209 | |
| 210 | // Load islands |
| 211 | await Promise.all( |
| 212 | Array.from(this.islandModNameToChunk.entries()).map( |
| 213 | async ([name, chunk]) => { |
| 214 | const fileUrl = maybeToFileUrl(chunk.server); |
| 215 | const mod = await import(fileUrl); |
| 216 | |
| 217 | if (chunk.browser === null) { |
| 218 | throw new Error(`Unexpected missing browser chunk`); |
| 219 | } |
| 220 | |
| 221 | preparer.prepare(this.islandRegistry, mod, chunk.browser, name, []); |
| 222 | }, |
| 223 | ), |
| 224 | ); |
| 225 | } |
| 226 | |
| 227 | async prepare(): Promise<void> { |
| 228 | // Load FS routes |
nothing calls this directly
no test coverage detected