The Angular app contains 800 lazy-loaded routes to 800 individual components living in Nx Workspace Libraries.
Webpack: npx nx run myapp:build
Rspack: npx nx run myapp:build-rs
Run npx http-server dist/apps/myapp
.
This should start a local server on port 8080
which can be accessed via the browser.
# Webpack Results (with Angular's Incremental Build Caching)
Benchmark 1: npx nx run myapp:build --skip-nx-cache
Time (mean ± σ): 8.737 s ± 0.718 s [User: 16.176 s, System: 1.463 s]
Range (min … max): 7.782 s … 9.938 s 10 runs
# Rspack Results
Benchmark 1: npx nx run myapp:build-rs --skip-nx-cache
Time (mean ± σ): 5.430 s ± 0.516 s [User: 14.692 s, System: 2.228 s]
Range (min … max): 4.840 s … 6.335 s 10 runs
Install hyperfine
On MacOS: brew install hyperfine
Run npm run benchmark