What changed
Feature routes were already standalone. This only moves root bootstrap and the provider list. I deleted AppModule and AppServerModule.
| Before | Now |
|---|---|
src/app/app.module.ts |
Deleted. Providers live in src/app/app.config.ts. |
src/app/app.server.module.ts |
Deleted. Server adds provideServerRendering() from @angular/platform-server in src/app/app.config.server.ts. |
AppComponent standalone: false |
Standalone. Imports the shell the template already used. Dev toolbar still joins that list only when environment.production is false. |
bootstrapModule(AppModule) |
bootstrapApplication(AppComponent, appConfig). Same delayed start and smoothscroll polyfill. |
AppServerModule on CommonEngine |
bootstrap(context) is the third-argument form. Skip the context and Angular throws NG0401. |
renderModule in serverless.ts |
renderApplication(bootstrap, { document, url }). Still exports app for the Lambda wrapper. |
| Firebase Universal 16 | Retired. The function returns 501. Hosting already rewrote to static /index.html. |
entryModule |
Removed from tsconfig.server.json. |
Calls I made
- Kept
provideZoneChangeDetection()inappConfig. Angular 21 standalone bootstrap is zoneless unless you say otherwise. - Kept
importProvidersFrom(ModalModule)as-is. NoforRoot(). Toastr and Stripe still use theirforRootconfigs. NgRx usesprovideStorewith the same five keys and the same loose runtime checks. - Left
withEventReplay()andwithNoHttpTransferCache()on the client config. - Did not rename
lamda.js.serverless.ymlstill listslambda.js, which is not in the checkout. If that path is still deployed, someone has to pick one filename.
How I checked it
| Check | Result |
|---|---|
| App typecheck | Pass. tsc -p tsconfig.app.json --noEmit with a 10 GB heap. 2567 files, 0 errors. |
| Server typecheck | Pass. tsc -p tsconfig.server.json --noEmit. Includes server.ts and serverless.ts. |
| Module leftovers | Pass. No AppModule or AppServerModule in .ts, .js, or .json. |
| QA / prod AOT build | Not run. An ng build was started and cut off after a few minutes. |
| SSR, hydration, logged-in product | Not run. That is the checklist below. |
node --max_old_space_size=10048 ./node_modules/typescript/bin/tsc -p tsconfig.app.json --noEmit
node --max_old_space_size=10048 ./node_modules/typescript/bin/tsc -p tsconfig.server.json --noEmit
Verification checklist
Human QA. A person has to click through a running build with the console open. Do not use / to prove SSR. server.ts serves browser/index.html for the homepage before it calls renderApp. That page can look fine while the new bootstrap throws NG0401 on every fresh render.
0 of 0 checked