Skip to content

Commit 20ffd26

Browse files
committed
Step 2 - Enable SSR
1 parent c251f8e commit 20ffd26

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

apps/host-application/project.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@
3232
}
3333
],
3434
"styles": ["apps/host-application/src/styles.css"],
35-
"scripts": []
35+
"scripts": [],
36+
"server": "apps/host-application/src/main.server.ts",
37+
"ssr": {
38+
"entry": "apps/host-application/src/server.ts"
39+
},
40+
"outputMode": "server"
3641
},
3742
"configurations": {
3843
"production": {
Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
import { Route } from '@angular/router';
22
import { loadModule } from '@klerick/nx-angular-mf/loadModule';
33

4-
export const appRoutes: Route[] = [{
5-
path: '',
6-
loadComponent: () => import('./nx-welcome.component').then(r => r.NxWelcomeComponent)
7-
}, {
8-
path: 'first',
9-
loadChildren: () =>
10-
loadModule<{ firstRoutes: Route[] }>('firstRemote/FirstRemoteRoute').then(
11-
(r) => r.firstRoutes
12-
),
13-
},];
4+
export const appRoutes: Route[] = [
5+
{
6+
path: '',
7+
loadComponent: () =>
8+
import('./nx-welcome.component').then((r) => r.NxWelcomeComponent),
9+
},
10+
{
11+
path: 'first',
12+
loadChildren: () =>
13+
loadModule<{ firstRoutes: Route[] }>('firstRemote/FirstRemoteRoute').then(
14+
(r) => r.firstRoutes
15+
),
16+
},
17+
];

0 commit comments

Comments
 (0)