Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions website/docs/en/blog/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Overview
sidebar: false
pageType: doc-wide
---

# Rslib blogs
Expand Down
1 change: 1 addition & 0 deletions website/docs/en/blog/introducing-rslib.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
date: 2025-05-14 10:00:00
sidebar: false
pageType: doc-wide
---

_May 14, 2025_
Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/guide/advanced/output-compatibility.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@ export default defineConfig({
1. Configure `output.external` with `resolvedPolyfillToModules`, which you can import from [@rsbuild/plugin-node-polyfill](https://github.com/rspack-contrib/rsbuild-plugin-node-polyfill). This will externalize the polyfill modules to the installed polyfill dependencies.
2. Install used polyfill modules as dependencies.

With the following steps, every usage of the polyfill module will be replaced by the corresponding module in the `externals` field. Checkout the <SourceCode href="https://github.com/web-infra-dev/rslib/blob/main/tests/integration/node-polyfill/bundle-false/rslib.config.ts" /> of the example for more details.
With the above steps, every usage of the polyfill module will be replaced by the corresponding module in the `externals` field. Checkout the <SourceCode href="https://github.com/web-infra-dev/rslib/blob/main/tests/integration/node-polyfill/bundle-false/rslib.config.ts" /> of the example for more details.

Check out the documentation of [@rsbuild/plugin-node-polyfill](https://github.com/rspack-contrib/rsbuild-plugin-node-polyfill), all the configurations are applicable for Rslib.
1 change: 1 addition & 0 deletions website/docs/zh/blog/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: 总览
sidebar: false
pageType: doc-wide
---

# Rslib 博客
Expand Down
1 change: 1 addition & 0 deletions website/docs/zh/blog/introducing-rslib.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
date: 2025-05-14 10:00:00
sidebar: false
pageType: doc-wide
---

_2025 年 5 月 14 日_
Expand Down
2 changes: 1 addition & 1 deletion website/docs/zh/guide/advanced/output-compatibility.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@ export default defineConfig({
1. 配置 `output.external` 和 `resolvedPolyfillToModules`,你可以从 [@rsbuild/plugin-node-polyfill](https://github.com/rspack-contrib/rsbuild-plugin-node-polyfill) 导入。这将 polyfill 模块 external 到已安装的 polyfill 依赖中。
2. 安装使用的 polyfill 模块作为依赖。

通过以下步骤,每个 polyfill 模块的使用将被替换为 `externals` 字段中的相应模块。更多详细信息,请查看 <SourceCode href="https://github.com/web-infra-dev/rslib/blob/main/tests/integration/node-polyfill/bundle-false/rslib.config.ts" /> 的示例。
通过以上步骤,每个 polyfill 模块的使用将被替换为 `externals` 字段中的相应模块。更多详细信息,请查看 <SourceCode href="https://github.com/web-infra-dev/rslib/blob/main/tests/integration/node-polyfill/bundle-false/rslib.config.ts" /> 的示例。

更多详细信息,请查看 [@rsbuild/plugin-node-polyfill](https://github.com/rspack-contrib/rsbuild-plugin-node-polyfill) 文档,所有配置均适用于 Rslib。
60 changes: 22 additions & 38 deletions website/rspress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,25 @@ import { pluginFontOpenSans } from 'rspress-plugin-font-open-sans';

const siteUrl = 'https://rslib.rs';
const description = 'The Rsbuild-based library development tool';
const descriptionZh = '基于 Rsbuild 的库构建工具';

export default defineConfig({
title: 'Rslib',
description:
'Rslib is a library development tool that leverages the well-designed configurations and plugins of Rsbuild.',
lang: 'en',
icon: 'https://assets.rspack.rs/rslib/rslib-logo-192x192.png',
logo: 'https://assets.rspack.rs/rslib/rslib-logo-192x192.png',
logoText: 'Rslib',
root: path.join(__dirname, 'docs'),
markdown: {
shiki: {
transformers: [transformerNotationHighlight(), transformerNotationDiff()],
},
},
search: {
codeBlocks: true,
},
plugins: [
pluginAlgolia(),
pluginFontOpenSans(),
Expand Down Expand Up @@ -52,22 +69,6 @@ export default defineConfig({
siteUrl,
}),
],
root: path.join(__dirname, 'docs'),
lang: 'en',
title: 'Rslib',
description:
'Rslib is a library development tool that leverages the well-designed configurations and plugins of Rsbuild.',
icon: 'https://assets.rspack.rs/rslib/rslib-logo-192x192.png',
logo: 'https://assets.rspack.rs/rslib/rslib-logo-192x192.png',
logoText: 'Rslib',
markdown: {
shiki: {
transformers: [transformerNotationHighlight(), transformerNotationDiff()],
},
},
search: {
codeBlocks: true,
},
route: {
cleanUrls: true,
// exclude document fragments from routes
Expand Down Expand Up @@ -102,39 +103,22 @@ export default defineConfig({
content: 'https://discord.gg/XsaKEEk4mW',
},
],
editLink: {
docRepoBaseUrl:
'https://github.com/web-infra-dev/rslib/tree/main/website/docs',
},
locales: [
{
lang: 'en',
label: 'English',
title: 'Rslib',
description,
editLink: {
docRepoBaseUrl:
'https://github.com/web-infra-dev/rslib/tree/main/website/docs',
text: '📝 Edit this page on GitHub',
},
},
{
lang: 'zh',
label: '简体中文',
title: 'Rslib',
outlineTitle: '目录',
prevPageText: '上一页',
nextPageText: '下一页',
searchPlaceholderText: '搜索文档',
searchNoResultsText: '无法找到相关搜索结果',
searchSuggestedQueryText: '请使用不同的关键字重试',
description: '基于 Rsbuild 的库构建工具',
overview: {
filterNameText: '过滤',
filterPlaceholderText: '输入关键词',
filterNoResultText: '未找到匹配的 API',
},
editLink: {
docRepoBaseUrl:
'https://github.com/web-infra-dev/rslib/tree/main/website/docs',
text: '📝 在 GitHub 上编辑此页',
},
description: descriptionZh,
},
],
},
Expand Down
Loading