Fonts come from npm, not Google, so no third-party font requests. Pages are prerendered at build time; browser-only code is guarded. nginx serves per-route HTML, a real 404 and gzip.
13 lines
515 B
TypeScript
13 lines
515 B
TypeScript
import { RenderMode, ServerRoute } from '@angular/ssr';
|
|
import { routes } from './app.routes';
|
|
|
|
const WILDCARD = '**';
|
|
|
|
/** Every static route gets its own HTML at build time; the catch-all stays client-rendered (it cannot be prerendered without params). */
|
|
export const serverRoutes: ServerRoute[] = [
|
|
...routes
|
|
.filter(route => route.path !== WILDCARD)
|
|
.map((route): ServerRoute => ({ path: route.path ?? '', renderMode: RenderMode.Prerender })),
|
|
{ path: WILDCARD, renderMode: RenderMode.Client },
|
|
];
|