Scaffolding New Apps With Angular Rspack
Blog post from Nx
Angular applications, especially in enterprise settings, have traditionally relied on custom Webpack configurations due to its extensibility, despite slow build times. This has led to the emergence of alternative bundlers like Esbuild, Vite, and Rspack. Although Esbuild offers improved build speeds, it lacks the extensibility needed by many teams, which is where Rspack, a high-performance bundler written in Rust, comes in. Rspack provides compatibility with the Webpack ecosystem and significant build speed improvements, making it a compelling choice for new projects or migrating existing ones. Angular Rspack further enhances this by providing plugins and loaders that enable Angular applications to be built using Rspack, independent of Angular's Webpack build pipeline. This allows for significant time savings, better extensibility, and compatibility, especially in projects with complex requirements. While Esbuild remains faster in raw benchmarks, Rspack offers better extensibility and compatibility, supporting advanced use cases like micro-frontends and offering improved control over chunking. Nx facilitates the creation and migration of Angular Rspack projects, and ongoing updates aim to achieve feature parity with Angular CLI, including support for internationalization and static site generation.