Friday, May 2, 2025

๐Ÿงน How to Remove SSR (Server Side Rendering) from an Angular 19 Project

Sometimes you add Angular SSR using @angular/ssr, but later want to return to a clean client-side app. Here's how to fully remove SSR (Server-Side Rendering) from your Angular project. ๐Ÿ”ฅ Step 1: Delete SSR Files Remove these files from the src/ folder: main.server.ts app.server.module.ts server.ts Any .server.ts files like: app.routes.server.ts app.config.server.ts ๐Ÿ› ️ Step 2: Update angular.json Inside "architect > build > options", remove the following: Also remove the entire "server" block from angular.json if it exists. ๐Ÿงพ Step 3: Clean Up TypeScript Config ❌ Delete: tsconfig.server.json ✅ Edit tsconfig.app.json like this: ๐Ÿงน Step 4: Uninstall SSR Dependencies ๐Ÿ–ฅ️ Run in Terminal / PowerShell / CMD: ๐Ÿš€ Step 5: Clean & Serve PowerShell (Windows): Mac/Linux terminal: ✅ Done! Your Angular app is now SSR-free and runs entirely with Client-Side Rendering (CSR) — faster dev, fewer headaches!

No comments:

Post a Comment

How to Do Cross-Browser Testing on Windows — Including Safari via Playwright

To test follow few steps: Step 1. Install node Step 2. create Folder and run these commands commands Copy Code ...