Skip to content

Commit c295ee7

Browse files
authored
docs: add why Rslib chapter (#755)
1 parent 53a7644 commit c295ee7

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ Rslib provides a comprehensive set of build features for library development, in
1010
- **Declaration file generation**: Including isolated declarations.
1111
- **Advanced features**: Module Federation, asset compression, PostCSS, Lightning CSS, and more.
1212

13+
## 🚀 Why Rslib
14+
15+
In developing component or utility libraries, developers need to focus not only on implementing project logic but also on handling non-code tasks such as building, debugging, documentation, and testing. Many existing community tools and solutions can address some of these requirements; however, for developers who are not familiar with these tools, meeting these demands often involves tedious configuration or coordinating multiple tools.
16+
17+
Based on Rspack and Rsbuild, Rslib offers a comprehensive solution tailored to the diverse needs of library development. It effectively addresses issues like an underdeveloped tooling ecosystem, high costs for module standard compatibility, and insufficient output optimization. Rslib improves upon webpack's limited support for library ESM outputs, enabling the production of high-quality, tree-shakeable ESM builds. Additionally, Rslib fully capitalizes on the build performance advantages of Rspack and leverages the strengths of both the webpack and Rspack ecosystems to robustly support features such as Module Federation.
18+
19+
Furthermore, by sharing a unified configuration, Rslib resolves the challenge of reusing build configurations between application projects and library projects, thereby reducing configuration overhead and enhancing developer productivity and experience.
20+
1321
## 🔥 Features
1422

1523
Rslib has the following features:

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ Rslib 提供了丰富的构建功能,包括:
1010
- **类型声明文件生成**: 包括 isolated declarations。
1111
- **进阶功能**: 模块联邦、资源压缩、PostCSS、Lightning CSS 等。
1212

13+
## 🚀 为什么选择 Rslib
14+
15+
在开发组件库或工具库时,开发者不仅需要关注项目逻辑的实现,还需考虑项目的构建、调试、文档和测试等与代码逻辑无关的工作。现有许多社区工具与方案通常能较好地满足其中部分需求,但对于不熟悉这些工具与方案的开发者来说,往往需要繁琐的配置工作或多种工具配合使用,以满足这些需求。
16+
17+
Rslib 基于 Rspack 与 Rsbuild 实现,针对库开发场景的多样化需求,提供了一套完整的解决方案,有效解决了库开发中的工具生态不完善、模块规范兼容成本高、产物优化不足等问题。Rslib 对 webpack 对 library ESM 产物支持不足的情况进行了优化,可以产出支持 tree-shaking 的高质量 ESM 产物。同时,Rslib 充分发挥了 Rspack 带来的构建性能优势,并利用 webpack / Rspack 生态的优势,很好地支持了模块联邦等功能。
18+
19+
此外,Rslib 可以通过共享一套统一的配置,解决应用项目与库项目之间构建配置难以复用的问题,进而降低开发者的配置成本,提升开发效率与体验。
20+
1321
## 🔥 特性
1422

1523
Rslib 具备以下特性:

0 commit comments

Comments
 (0)