# Optimizing Our Build Times by Migrating from Webpack to Rspack

[Yelp](https://yomu.fyi/company/yelp) · Benson Pan, Software Engineer · May 20, 2026

**Type:** Problem & solution

## Summary

As Yelp's JavaScript monorepo expanded over time, Webpack build speeds became a significant engineering bottleneck. To resolve this without rewriting complex configurations, the team selected Rspack for its direct compatibility with existing Webpack setups and plugins. Yelp implemented an adapter pattern to generate Rspack configurations dynamically from original Webpack files, enabling a staged opt-in rollout across development tools and CI environments. Following the initial migration, engineers addressed performance issues in barrel files using automated codemods to replace star re-exports and import-then-export patterns with named re-exports. Combined with Rspack's portable persistent caching, the migration reduced integration build times by approximately 52 percent and warm cache builds by up to 80 percent.

## Context

Webpack build speeds became a major bottleneck as Yelp's JavaScript monorepo continued to grow. Prior incremental optimizations reached their limit, requiring a more substantial solution without the friction of migrating away from Webpack-compatible configuration patterns.

## Approach / What changed

Yelp transitioned to Rspack using an adapter pattern that derived Rspack configurations from existing Webpack files while preserving original settings. The team conducted a staged rollout with opt-in flags for developer tooling and CI, resolved tree-shaking blockers in barrel files via codemods, enabled Rspack portable persistent caching, and configured Storybook by clearing default Rsbuild rules.

## Takeaways

- An adapter pattern allowed Yelp to dynamically generate Rspack configs from existing Webpack files, preserving original settings and enabling a staged rollout.
- Automated codemods converting star re-exports and import-then-export patterns into true named re-exports fixed tree-shaking and barrel file performance issues.
- Rspack portable persistent cache solved Webpack absolute-path CI limitations, yielding up to an 80 percent reduction in build times on warm caches.

**Tags:** [Caching](https://yomu.fyi/topic/caching), [CI/CD](https://yomu.fyi/topic/ci-cd), [Developer Experience](https://yomu.fyi/topic/developer-experience), [Migrations](https://yomu.fyi/topic/migration), [Performance](https://yomu.fyi/topic/performance)

[Read original post](https://engineeringblog.yelp.com/2026/05/optimizing-our-build-times-by-migrating-from-webpack-to-rspack.html)
