Frontend Development 9 min read

Rspack v1.2 Release: Persistent Cache, Yarn PnP Support, Performance Optimizations, and Ecosystem Updates

Rspack v1.2 introduces experimental persistent caching, Yarn PnP support, faster code splitting, reduced memory usage, smaller bundle sizes, and Angular integration, along with detailed upgrade guidance and performance benchmarks, making it a significant improvement for frontend developers.

ByteDance Web Infra
ByteDance Web Infra
ByteDance Web Infra
Rspack v1.2 Release: Persistent Cache, Yarn PnP Support, Performance Optimizations, and Ecosystem Updates

Rspack v1.2 has been officially released, bringing a series of new features, performance optimizations, ecosystem enhancements, and upgrade guidance for developers.

New Features

Support Persistent Cache

Rspack v1.2 experimentally supports persistent caching, which writes build cache information to storage to accelerate subsequent starts, achieving up to 250% performance improvement in hot start scenarios.

module.exports = {
  cache: true,
  experiments: {
    cache: {
      type: 'persistent',
    },
  },
};

When the build hits the cache, real‑world projects can see up to a 250% speed boost.

Support Yarn PnP

Rspack now supports Yarn Plug‑and‑Play. It automatically enables the feature when process.versions.pnp is present, or you can force it by setting resolve.pnp to true .

module.exports = {
  resolve: {
    pnp: true,
  },
};

Special thanks to @arcanis, a Yarn maintainer, for implementing PnP resolution in Rspack.

Performance Optimizations

Faster Code Splitting

The new code‑splitting algorithm is multi‑threaded and incremental, dramatically improving performance for projects with many dynamic imports.

module.exports = {
  experiments: {
    parallelCodeSplitting: true,
  },
};

Watch Scope Changes

Rspack v1.2 no longer watches files under node_modules and .git , reducing the number of watched files and delivering performance gains.

Memory usage reduced by 120 MB

Dev start speed increased by 40%

HMR speed improved by 20‑30%

This change does not affect symlinked resources in monorepos because Rspack resolves them to their real paths.

module.exports = {
  watchOptions: {
    ignored: [],
  },
};

Reduced Memory Usage

The internal string storage in rspack-sources now points all strings to a shared heap, eliminating unnecessary allocations during source computation.

Smaller Compression Size

The default SWC minimizer passes value is set to 2 , reducing bundle size by 1‑7% compared with the previous default of 1 .

new rspack.SwcJsMinimizerRspackPlugin({
  minimizerOptions: {
    compress: {
      // previously defaulted to 1
      passes: 2,
    },
  },
});

Faster Side‑Effect Optimization

The side‑effect optimization has been refactored to a simpler, more parallelizable implementation, delivering a 2‑3× speed increase in tests.

Ecosystem

Angular Support

Core member Colum Ferry contributed full Angular support via @ng-rsbuild/plugin-angular and @ng-rspack/build , allowing developers to build Angular apps with Rspack or Rsbuild and benefit from faster builds and module federation.

More details are available in the ng-rspack-build repository.

Rsbuild v1.2

Rsbuild v1.2 is released in sync with Rspack v1.2 and adds:

Custom manifest generation via output.manifest.generate

Selective file retention in the output directory via cleanDistPath.keep

Smaller runtime code for @rsbuild/plugin-assets-retry

Upgrade Guide

Upgrade SWC Plugin

The Rust dependency swc_core is upgraded to 10.1.0 . Users of the SWC Wasm plugin must align their swc_core version to avoid compatibility issues.

WarnCaseSensitiveModules Disabled by Default

The WarnCaseSensitiveModulesPlugin used to warn about case‑sensitive module path conflicts is now disabled by default to avoid extra overhead in development mode.

module.exports = {
  plugins: [new rspack.WarnCaseSensitiveModulesPlugin()],
};

References

For detailed documentation, see the linked references in the original release notes.

performance optimizationFrontend Developmentbuild-toolRspackpersistent cachev1.2
ByteDance Web Infra
Written by

ByteDance Web Infra

ByteDance Web Infra team, focused on delivering excellent technical solutions, building an open tech ecosystem, and advancing front-end technology within the company and the industry | The best way to predict the future is to create it

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.