FAQ

What will be the relationship between Rspack and Webpack in the future?

We have established a partnership with the webpack team. Rspack is an attempt to optimize webpack performance using Rust, and it has already made good progress.

We will continue to explore more possibilities for optimizing webpack with the webpack team. When Rspack reaches a certain level of maturity, webpack will attempt to integrate Rspack into webpack with experiments flag.

Will compatibility with JavaScript or webpack ecosystem cause performance loss?

We place more emphasis on bringing performance improvements to existing web projects at a lower migration cost than simply chasing benchmark metrics.

Compatibility with the Webpack ecosystem will result in some performance loss, but according to our verification results, this loss is within an acceptable range.

How to achieve compatibility fallback compilation without using babel-loader?

Rspack internally uses SWC to perform code downgrade compilation which you can configure by builtin:swc-loader, so there is no need to use babel-loader to perform code downgrade compilation.

Is Rspack 100% compatible with Webpack API?

No, the goal of Rspack is not to be 100% compatible with 100% of the Webpack API. Based on the Pareto principle, we prioritize the implementation of APIs that are commonly used in most projects and support other APIs based on user needs.

Does Rspack plan to support Wasm for browser-side build?

We plan to support it. We are exploring the Wasm solution together with the NAPI-RS team, and it is still in the exploration stage. There will be more progress in the future.

What are the advantages of Rspack compared to Webpack + SWC-loader?

Even if webpack + SWC-loader solves the performance problem of babel-loader, webpack itself still has many performance bottlenecks, such as the make and seal stages, which are single-threaded. However, Rspack breaks through these limitations, so Rspack has better performance than webpack + SWC-loader, especially in multi-core scenarios.

Do custom plugins and custom loaders need to be developed using Rust?

No, you can develop plugins and loaders using JavaScript, just like developing webpack plugins and loaders. Meanwhile, we are exploring how to support users to develop custom plugins and loaders using Rust.

Does Rspack plan to support React Server Component?

Rspack will support the React Server Component. Currently, we have been experimenting with Rspack + RSC in an internal project and have seen noticeable performance improvements.

Related PR: #5824.

Can Rspack be used in production environments now? What are the differences between production artifacts and webpack?

Yes, we're currently using Rspack for building in many internal projects and it's running smoothly in production environments.

Our goal is to make the runtime code generated by Rspack completely aligned with Webpack (i.e. you can hardly tell from the outputs whether it's Webpack or Rspack's outputs). Although we haven't achieved full alignment yet, we will continue to improve the runtime and eventually achieve full alignment.