Skip to content

Commit 21f502d

Browse files
committed
chore: update
1 parent 76b0959 commit 21f502d

File tree

3 files changed

+74
-13
lines changed

3 files changed

+74
-13
lines changed

website/docs/en/blog/introducing-rslib.mdx

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ Therefore, we created Rslib. **Based on the well-designed configurations and plu
3939

4040
We hope Rslib can provide more powerful features for library developers and become an important part of the Rspack ecosystem, continuously promoting the development of unified toolchains based on Rspack.
4141

42-
![Rslib in Rstack ecosystem](https://assets.rspack.dev/others/assets/rslib/rslib-in-rstack.png)
42+
<img
43+
src="https://assets.rspack.dev/others/assets/rslib/rslib-in-rstack.png"
44+
alt="Rslib in Rstack ecosystem"
45+
width="760"
46+
style={{ display: 'block', margin: '0 auto' }}
47+
/>
4348

4449
<ImageAlt>The location of Rslib in the Rstack ecosystem</ImageAlt>
4550

@@ -59,19 +64,34 @@ Rslib provides a comprehensive library building solution that covers most curren
5964

6065
For TypeScript declaration files (d.ts), besides supporting d.ts file generation and related post-processing based on TypeScript Compiler API, it also supports bundling d.ts files using [@microsoft/api-extractor](https://www.npmjs.com/package/@microsoft/api-extractor), suitable for handling complex dependency scenarios.
6166

62-
![Multiple formats in one configuration file](https://assets.rspack.dev/others/assets/rslib/multiple-formats-config.png)
67+
<img
68+
src="https://assets.rspack.dev/others/assets/rslib/multiple-formats-config.png"
69+
alt="Multiple formats in one configuration file"
70+
width="400"
71+
style={{ display: 'block', margin: '0 auto' }}
72+
/>
6373

6474
<ImageAlt>Multiple formats in one configuration file</ImageAlt>
6575

66-
![Clean ESM output](https://assets.rspack.dev/others/assets/rslib/simple-esm-output.png)
76+
<img
77+
src="https://assets.rspack.dev/others/assets/rslib/simple-esm-output.png"
78+
alt="Clean ESM output"
79+
width="400"
80+
style={{ display: 'block', margin: '0 auto' }}
81+
/>
6782

6883
<ImageAlt>Clean ESM output</ImageAlt>
6984

7085
- **Bundle & Bundleless**
7186

7287
Rslib supports both bundle and bundleless build modes during build process. For bundleless scenarios, it also supports [output path redirection](/config/lib/redirect) feature, solving common issues with alias replacement in JavaScript and d.ts output paths, as well as strict path reference requirements in ESM.
7388

74-
![bundleless output structure](https://assets.rspack.dev/rslib/rslib-bundleless-mode.png)
89+
<img
90+
src="https://assets.rspack.dev/rslib/rslib-bundleless-mode.png"
91+
alt="bundleless output structure"
92+
width="760"
93+
style={{ display: 'block', margin: '0 auto' }}
94+
/>
7595

7696
<ImageAlt>bundleless output structure</ImageAlt>
7797

@@ -81,7 +101,12 @@ Rslib provides a comprehensive library building solution that covers most curren
81101

82102
Leveraging Rsbuild's plugin system and ecosystem, Rslib can directly reuse solutions for Sass, Less, Stylus, CSS Modules, and Tailwind CSS. Whether in bundle or bundleless scenarios, users can process styles just like building web application, directly through configuration or installing corresponding plugins.
83103

84-
![Support multiple style solutions](https://assets.rspack.dev/others/assets/rslib/multiple-styles-config.png)
104+
<img
105+
src="https://assets.rspack.dev/others/assets/rslib/multiple-styles-config.png"
106+
alt="Support multiple style solutions"
107+
width="760"
108+
style={{ display: 'block', margin: '0 auto' }}
109+
/>
85110

86111
<ImageAlt>Support multiple style solutions</ImageAlt>
87112

@@ -115,7 +140,12 @@ Beyond common JavaScript library development solutions, based on Rspack and the
115140
- Use [ESLint plugin](https://github.com/rspack-contrib/rsbuild-plugin-eslint) for ESLint validation during development.
116141
- Use [publint plugin](https://github.com/rspack-contrib/rsbuild-plugin-publint) to check if the library's package.json is configured correctly.
117142

118-
![Use publint to check package.json](https://assets.rspack.dev/others/assets/rslib/publint-screenshot.png)
143+
<img
144+
src="https://assets.rspack.dev/others/assets/rslib/publint-screenshot.png"
145+
alt="Use publint to check package.json"
146+
width="760"
147+
style={{ display: 'block', margin: '0 auto' }}
148+
/>
119149

120150
<ImageAlt>Use publint to check package.json</ImageAlt>
121151

website/docs/zh/blog/introducing-rslib.mdx

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ import { ImageAlt } from '../../../theme/components/ImageAlt';
3939

4040
我们希望 Rslib 能为库开发者提供更强大的能力,并成为 Rspack 生态中的重要组成部分,持续推动基于 Rspack 的统一工具链的发展。
4141

42-
![Rslib 在 Rstack 生态中的位置](https://assets.rspack.dev/others/assets/rslib/rslib-in-rstack.png)
42+
<img
43+
src="https://assets.rspack.dev/others/assets/rslib/rslib-in-rstack.png"
44+
alt="Rslib 在 Rstack 生态中的位置"
45+
width="760"
46+
style={{ display: 'block', margin: '0 auto' }}
47+
/>
4348

4449
<ImageAlt>Rslib 在 Rstack 生态中的位置</ImageAlt>
4550

@@ -59,19 +64,34 @@ Rslib 提供了一套全面的库构建解决方案,涵盖了目前大部分
5964

6065
对于 TypeScript 类型声明文件(d.ts),除了支持基于 TypeScript Compiler API 生成 d.ts 文件及相关后处理,也支持基于 [@microsoft/api-extractor](https://www.npmjs.com/package/@microsoft/api-extractor) 对 d.ts 文件进行打包,适合处理依赖复杂的场景。
6166

62-
![一个配置文件中包含多种格式](https://assets.rspack.dev/others/assets/rslib/multiple-formats-config.png)
67+
<img
68+
src="https://assets.rspack.dev/others/assets/rslib/multiple-formats-config.png"
69+
alt="一个配置文件中包含多种格式"
70+
width="400"
71+
style={{ display: 'block', margin: '0 auto' }}
72+
/>
6373

6474
<ImageAlt>一个配置文件中包含多种格式</ImageAlt>
6575

66-
![纯净的 ESM 产物](https://assets.rspack.dev/others/assets/rslib/simple-esm-output.png)
76+
<img
77+
src="https://assets.rspack.dev/others/assets/rslib/simple-esm-output.png"
78+
alt="纯净的 ESM 产物"
79+
width="400"
80+
style={{ display: 'block', margin: '0 auto' }}
81+
/>
6782

6883
<ImageAlt>纯净的 ESM 产物</ImageAlt>
6984

7085
- **bundle & bundleless**
7186

7287
Rslib 支持在构建时选择打包(bundle)或仅做转换(bundleless)这两种常见的构建模式。对于 bundleless 场景,还支持了 [产物路径重定向](/config/lib/redirect) 功能,从而解决了常见的 JavaScript 和 d.ts 产物路径中别名替换以及 ESM 要求严格引用路径的问题。
7388

74-
![bundleless 产物结构](https://assets.rspack.dev/rslib/rslib-bundleless-mode.png)
89+
<img
90+
src="https://assets.rspack.dev/rslib/rslib-bundleless-mode.png"
91+
alt="bundleless 产物结构"
92+
width="760"
93+
style={{ display: 'block', margin: '0 auto' }}
94+
/>
7595

7696
<ImageAlt>bundleless 产物结构</ImageAlt>
7797

@@ -81,7 +101,12 @@ Rslib 提供了一套全面的库构建解决方案,涵盖了目前大部分
81101

82102
借助 Rsbuild 的插件系统和生态,Rslib 可以直接复用 Sass、Less、Stylus、CSS Modules、Tailwind CSS 的解决方案。无论是在 bundle 还是 bundleless 的场景下,用户都可以像构建 web 应用一样,直接通过配置或安装相应插件来进行样式的处理。
83103

84-
![支持多种样式解决方案](https://assets.rspack.dev/others/assets/rslib/multiple-styles-config.png)
104+
<img
105+
src="https://assets.rspack.dev/others/assets/rslib/multiple-styles-config.png"
106+
alt="支持多种样式解决方案"
107+
width="760"
108+
style={{ display: 'block', margin: '0 auto' }}
109+
/>
85110

86111
<ImageAlt>支持多种样式解决方案</ImageAlt>
87112

@@ -115,9 +140,14 @@ Rslib 提供了一套全面的库构建解决方案,涵盖了目前大部分
115140
- 使用 [ESLint 插件](https://github.com/rspack-contrib/rsbuild-plugin-eslint) 在开发时进行 ESLint 校验。
116141
- 使用 [publint 插件](https://github.com/rspack-contrib/rsbuild-plugin-publint) 检查开发的库的 package.json 是否配置正确。
117142

118-
![使用 publint 检查 package.json 正确性](https://assets.rspack.dev/others/assets/rslib/publint-screenshot.png)
143+
<img
144+
src="https://assets.rspack.dev/others/assets/rslib/publint-screenshot.png"
145+
alt="使用 publint 检查 package.json 正确性"
146+
width="760"
147+
style={{ display: 'block', margin: '0 auto' }}
148+
/>
119149

120-
<ImageAlt>使用 publint 检查 package.json 的正确性</ImageAlt>
150+
<ImageAlt>使用 publint 检查 package.json 的正确性</ImageAlt>
121151

122152
> 更多插件的信息请参考 [Rsbuild 插件总览](https://rsbuild.dev/zh/plugins/list/)
123153

website/theme/components/ImageAlt.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export const ImageAlt = (props: { children?: React.ReactNode }) => {
44
style={{
55
textAlign: 'center',
66
fontSize: '0.8rem',
7+
margin: '0.5rem 0',
78
color: '#999',
89
}}
910
>

0 commit comments

Comments
 (0)