Skip to content

Commit 8f44d59

Browse files
committed
docs: add why Rslib chapter
1 parent ebe23ee commit 8f44d59

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

website/docs/en/guide/start/index.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
# Introduction
22

3-
Rslib is a library development tool that leverages the well-designed configurations and plugins of [Rsbuild](https://rsbuild.dev), empowering library developers to take advantage of the extensive knowledge and ecosystem of webpack and Rspack.
3+
Rslib is a library development tool that leverages the well-designed configurations and plugins of [Rsbuild](https://rsbuild.dev), providing an out-of-the-box development experience for library developers.
44

5-
Rslib provides a comprehensive set of build features for library development, including:
5+
## 🚀 Why Rslib
6+
7+
In the development of component and utility libraries, developers frequently face various build requirements. If they are not very familiar with certain build tools and solutions, additional configuration work or the simultaneous use of multiple tools is often required to achieve these requirements.
8+
9+
Rslib designs a complete out-of-the-box solution for library development scenarios. It allows developers to focus on writing code for actual features without spending excessive time on selecting and configuring tools. The comprehensive set of build features provided by Rslib include:
610

711
- **Compilation of diverse languages**: TypeScript, JSX, Sass, Less, CSS Modules, Wasm, and more.
812
- **Flexible build modes**: Bundle and bundleless options to meet varying needs.
913
- **Multiple output formats**: ESM, CJS, and UMD for maximum compatibility.
1014
- **Declaration file generation**: Including isolated declarations.
1115
- **Advanced features**: Module Federation, asset compression, PostCSS, Lightning CSS, and more.
1216

17+
On the other hand, developers often work on application projects, component libraries, and utility libraries concurrently. Another significant advantage of Rslib lies in its underlying use of Rspack for building, which supports the rich plugin ecosystems of both webpack and Rspack for delivering high-quality outputs. This enables the reuse and sharing of build configurations between application and library development, allowing developers to enjoy a consistent development experience while significantly reducing project maintenance costs.
18+
1319
## 🔥 Features
1420

1521
Rslib has the following features:

website/docs/zh/guide/start/index.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
# 介绍
22

3-
Rslib 是一个库开发工具,它基于 [Rsbuild](https://rsbuild.dev/zh/) 精心设计的配置和插件,使库开发者得以复用 webpack 和 Rspack 繁荣的知识和生态系统
3+
Rslib 是一个库开发工具,它基于 [Rsbuild](https://rsbuild.dev/zh/) 精心设计的配置和插件,为库开发者提供开箱即用的开发体验
44

5-
Rslib 提供了丰富的构建功能,包括:
5+
## 🚀 为什么选择 Rslib
6+
7+
在组件库和工具库的开发过程中,开发者常常面临各种构建需求,如果对一些构建工具和方案不太熟悉,往往需要额外的一些配置工作或同时使用多种工具配合来满足这些需求。
8+
9+
Rslib 为库开发场景设计了一套完整的开箱即用的解决方案,使开发者无需花费大量的时间在工具的选择和配置上,可以专注于库的功能开发。Rslib 提供的丰富的构建功能包括:
610

711
- **多种语言的编译**: TypeScript、JSX、Sass、Less、CSS Modules、Wasm 等。
812
- **灵活的构建模式**: Bundle 和 bundleless 模式以满足不同的需求。
913
- **多种输出格式**: ESM、CJS 和 UMD 以实现最大兼容性。
1014
- **类型声明文件生成**: 包括 isolated declarations。
1115
- **进阶功能**: 模块联邦、资源压缩、PostCSS、Lightning CSS 等。
1216

17+
另一方面,开发者通常会同时开发应用项目、组件库和工具库,Rslib 的另一个重要优势在于其底层使用 Rspack 进行构建,支持使用 webpack 和 Rspack 繁荣的插件生态输出高质量的产物,实现应用开发与库开发构建配置的复用与共享,让开发者在获得一致的开发体验的同时,显著降低项目的维护成本。
18+
1319
## 🔥 特性
1420

1521
Rslib 具备以下特性:

0 commit comments

Comments
 (0)