File tree Expand file tree Collapse file tree 1 file changed +5
-13
lines changed
packages/angular/build/src/utils/server-rendering Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -26,10 +26,12 @@ const { outputMode, hasSsrEntry } = workerData as {
26
26
hasSsrEntry : boolean ;
27
27
} ;
28
28
29
- let serverURL = DEFAULT_URL ;
30
-
31
29
/** Renders an application based on a provided options. */
32
30
async function extractRoutes ( ) : Promise < RoutersExtractorWorkerResult > {
31
+ const serverURL = outputMode !== undefined && hasSsrEntry ? await launchServer ( ) : DEFAULT_URL ;
32
+
33
+ patchFetchToLoadInMemoryAssets ( serverURL ) ;
34
+
33
35
const { ɵextractRoutesAndCreateRouteTree : extractRoutesAndCreateRouteTree } =
34
36
await loadEsmModuleFromMemory ( './main.server.mjs' ) ;
35
37
@@ -47,14 +49,4 @@ async function extractRoutes(): Promise<RoutersExtractorWorkerResult> {
47
49
} ;
48
50
}
49
51
50
- async function initialize ( ) {
51
- if ( outputMode !== undefined && hasSsrEntry ) {
52
- serverURL = await launchServer ( ) ;
53
- }
54
-
55
- patchFetchToLoadInMemoryAssets ( serverURL ) ;
56
-
57
- return extractRoutes ;
58
- }
59
-
60
- export default initialize ( ) ;
52
+ export default extractRoutes ;
You can’t perform that action at this time.
0 commit comments