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 {
2626 hasSsrEntry : boolean ;
2727} ;
2828
29- let serverURL = DEFAULT_URL ;
30-
3129/** Renders an application based on a provided options. */
3230async function extractRoutes ( ) : Promise < RoutersExtractorWorkerResult > {
31+ const serverURL = outputMode !== undefined && hasSsrEntry ? await launchServer ( ) : DEFAULT_URL ;
32+
33+ patchFetchToLoadInMemoryAssets ( serverURL ) ;
34+
3335 const { ɵextractRoutesAndCreateRouteTree : extractRoutesAndCreateRouteTree } =
3436 await loadEsmModuleFromMemory ( './main.server.mjs' ) ;
3537
@@ -47,14 +49,4 @@ async function extractRoutes(): Promise<RoutersExtractorWorkerResult> {
4749 } ;
4850}
4951
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