From Webpack to the Angular application builder

The migration replaces the main browser build with Angular’s application builder, giving one build path for the browser, SSR, and prerendering.

What changed

  • Builder browser was replaced by application, which uses esbuild instead of the old Webpack browser pipeline.
  • Config The build now names browser, server, and the SSR entry directly. The output root moved to dist/TopFans.
  • SSR server.ts is an ESM entry. It installs the server DOM explicitly and uses an ESM main-module check instead of Webpack’s __non_webpack_require__.
  • Prerender Prerendering is an application-builder option. QA, staging, and production use the routes file; fast builds pass --prerender=false.
  • Deploy The deployed browser files still come from dist/TopFans/browser/, so the upload boundary stays familiar.

The practical result

There is no separate browser build plus SSR build to keep aligned. One Angular build produces the browser and server artifacts, while the runtime and deployment scripts consume their new locations.