Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/web-infra-dev/rsbuild
The Rspack-based build tool. It's fast, out-of-the-box and extensible.
https://github.com/web-infra-dev/rsbuild
build-tool bundler frontend hacktoberfest javascript rspack typescript webpack
Last synced: 12 days ago
JSON representation
The Rspack-based build tool. It's fast, out-of-the-box and extensible.
- Host: GitHub
- URL: https://github.com/web-infra-dev/rsbuild
- Owner: web-infra-dev
- License: mit
- Created: 2023-10-07T12:59:03.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-17T11:20:44.000Z (24 days ago)
- Last Synced: 2024-10-17T14:13:38.074Z (24 days ago)
- Topics: build-tool, bundler, frontend, hacktoberfest, javascript, rspack, typescript, webpack
- Language: TypeScript
- Homepage: https://rsbuild.dev/
- Size: 24.5 MB
- Stars: 1,596
- Watchers: 13
- Forks: 128
- Open Issues: 29
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Rsbuild
English | [Portuguese](./README.pt-BR.md) | [็ฎไฝไธญๆ](./README.zh-CN.md)
Rsbuild is a high-performance build tool powered by Rspack. It provides a set of thoughtfully designed default build configs, offering an out-of-the-box development experience and can fully unleash the performance advantages of Rspack.
Rsbuild provides [rich build features](https://rsbuild.dev/guide/start/features), including the compilation of TypeScript, JSX, Sass, Less, CSS Modules, Wasm, and others. It also supports Module Federation, image compression, type checking, PostCSS, Lightning CSS, and more.
## ๐ก Comparisons
Rsbuild is a build tool that is on par with [Vite](https://vitejs.dev/), [Create React App](https://github.com/facebook/create-react-app), or [Vue CLI](https://github.com/vuejs/vue-cli). They all come with builtin dev servers, command line tools, and sensible build configurations to provide the out-of-the-box experience.
### CRA / Vue CLI
You can think of Rsbuild as a modernized version of Create React App or Vue CLI, with these main differences:
- The underlying bundler is switched from Webpack to Rspack, providing 5 to 10 times the build performance.
- It is decoupled from frontend UI frameworks and supports all UI frameworks via [plugins](https://rsbuild.dev/plugins/list/), including React, Vue, Svelte, Solid, etc.
- It offers better extensibility. You can extend Rsbuild flexibly via [Configurations](https://rsbuild.dev/config/), [Plugin API](https://rsbuild.dev/plugins/dev/), and [JavaScript API](https://rsbuild.dev/api/start/).### Vite
Rsbuild shares many similarities with Vite, as they are both aim to improve the frontend development experience. The main differences are:
- **Ecosystem compatibility**: Rsbuild is compatible with most webpack plugins and all Rspack plugins, while Vite is compatible with Rollup plugins. If you're currently using more plugins and loaders from the webpack ecosystem, migrating to Rsbuild would be relatively easy.
- **Production consistency**: Rsbuild uses Rspack for bundling during both the development and production builds, thus ensuring a high level of consistency between the development and production outputs. This is also one of the goals Vite aims to achieve with Rolldown.
- **Module Federation**: The Rsbuild team works closely with the [Module Federation](https://rsbuild.dev/guide/advanced/module-federation) development team, providing first-class support for Module Federation to help you develop large web applications with micro frontend architecture.## ๐ Performance
Rsbuild can fully leverage the build performance of Rspack. Here is the time taken to build 1000 React components:
![benchmark](https://assets.rspack.dev/rsbuild/assets/benchmark-latest.jpeg)
> The above data comes from the [performance-compare](https://github.com/rspack-contrib/performance-compare) benchmark.
## ๐ฅ Features
Rsbuild has the following features:
- **Easy to Configure**: One of the goals of Rsbuild is to provide out-of-the-box build capabilities for Rspack users, allowing developers to start a web project with zero configuration. In addition, Rsbuild provides semantic build configuration to reduce the learning curve for Rspack configuration.
- **Performance Oriented**: Rsbuild integrates high-performance Rust-based tools from the community, including [Rspack](https://rspack.dev), [SWC](https://swc.rs/) and [Lightning CSS](https://lightningcss.dev/), to deliver first-class build speed and development experience.
- **Plugin Ecosystem**: Rsbuild has a lightweight plugin system and includes a range of high-quality official plugins. Furthermore, Rsbuild is compatible with most webpack plugins and all Rspack plugins, allowing users to leverage existing community or in-house plugins in Rsbuild without the need for rewriting code.
- **Stable Artifacts**: Rsbuild is designed with a strong focus on the stability of build artifacts. It ensures high consistency between artifacts in the development and production builds, and automatically completes syntax downgrading and polyfill injection. Rsbuild also provides plugins for type checking and artifact syntax validation to prevent quality and compatibility issues in production code.
- **Framework Agnostic**: Rsbuild is not coupled with any front-end UI framework. It supports frameworks like React, Vue, Svelte, Solid, and Preact through plugins, and plans to support more UI frameworks from the community in the future.
## ๐ฏ Ecosystem
Rsbuild provides JavaScript API and plugin API for higher-level frameworks and tools. For example, we have implemented [Rspress](https://github.com/web-infra-dev/rspress) and [Rslib](https://github.com/web-infra-dev/rslib) based on Rsbuild, taking full advantage of its capabilities and ecosystem.
The following diagram illustrates the relationship between Rsbuild and other tools in the ecosystem:
![Rspack stack layers](https://assets.rspack.dev/rsbuild/assets/rspack-stack-layers.png)
## ๐ Getting Started
To get started with Rsbuild, see the [Quick Start](https://rsbuild.dev/guide/start/quick-start).
## ๐ฆ Links
- [Rspack](https://github.com/web-infra-dev/rspack): A fast Rust-based web bundler.
- [Rspress](https://github.com/web-infra-dev/rspress): A fast static site generator based on Rsbuild.
- [Rsdoctor](https://github.com/web-infra-dev/rsdoctor): A one-stop build analyzer for Rspack and webpack.
- [Rslib](https://github.com/web-infra-dev/rslib): The library build tool powered by Rsbuild.
- [Modern.js](https://github.com/web-infra-dev/modern.js): A progressive React framework based on Rsbuild.
- [awesome-rspack](https://github.com/web-infra-dev/awesome-rspack): A curated list of awesome things related to Rspack and Rsbuild.
- [rspack-examples](https://github.com/rspack-contrib/rspack-examples): Examples for Rspack, Rsbuild, Rspress and Rsdoctor.
- [storybook-rsbuild](https://github.com/rspack-contrib/storybook-rsbuild): Storybook builder powered by Rsbuild.
- [rsbuild-plugin-template](https://github.com/rspack-contrib/rsbuild-plugin-template)๏ผUse this template to create your own Rsbuild plugin.
- [rstack-design-resources](https://github.com/rspack-contrib/rstack-design-resources)๏ผDesign resources for Rspack, Rsbuild, Rspress and Rsdoctor.## ๐ค Contribution
> New contributors welcome!
Please read the [Contributing Guide](https://github.com/web-infra-dev/rsbuild/blob/main/CONTRIBUTING.md).
### Contributors
### Code of Conduct
This repo has adopted the ByteDance Open Source Code of Conduct. Please check [Code of Conduct](./CODE_OF_CONDUCT.md) for more details.
## ๐งโ๐ป Community
Come and chat with us on [Discord](https://discord.gg/XsaKEEk4mW)! The Rspack / Rsbuild team and users are active there, and we're always looking for contributions.
## ๐ Quality
Rsbuild uses [Web Infra QoS](https://web-infra-qos.netlify.app?product=rsbuild&metrics=bundle-size) to observe the trend of key metrics, such as bundle size, compile speed and install size.
## ๐ Credits
Some of the implementations of Rsbuild have drawn inspiration from outstanding projects in the community. We would like to express our gratitude to them:
- The implementation of some plugins is referenced from [create-react-app](https://github.com/facebook/create-react-app).
- Some utility functions are referenced from [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin).
- The design of some APIs is referenced from [vite](https://github.com/vitejs/vite).This Rsbuild website is powered by [Netlify](https://www.netlify.com/).
## ๐ License
Rsbuild is licensed under the [MIT License](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).