diff --git a/README.md b/README.md
index 36af7fc7f..9f1f85b09 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-
+
# Rslib
@@ -14,7 +14,7 @@
English | [简体中文](./README.zh-CN.md)
-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.
+Rslib is a library development tool that leverages the well-designed configurations and plugins of [Rsbuild](https://rsbuild.rs), empowering library developers to take advantage of the extensive knowledge and ecosystem of webpack and Rspack.
Rslib aims to provide library developers with:
@@ -38,7 +38,7 @@ Rslib is implemented based on Rsbuild and fully reuses the capabilities and ecos
The following diagram illustrates the relationship between Rslib and other tools in the ecosystem:
-
+
## 📚 Getting started
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 96e4244be..94cc6c358 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -1,5 +1,5 @@
-
+
# Rslib
@@ -14,7 +14,7 @@
[English](./README.md) | 简体中文
-Rslib 是一个库开发工具,它基于 [Rsbuild](https://rsbuild.dev/zh) 精心设计的配置和插件,使库开发者得以复用 webpack 和 Rspack 繁荣的知识和生态系统。
+Rslib 是一个库开发工具,它基于 [Rsbuild](https://rsbuild.rs/zh) 精心设计的配置和插件,使库开发者得以复用 webpack 和 Rspack 繁荣的知识和生态系统。
Rslib 旨在为库开发者提供:
@@ -38,7 +38,7 @@ Rslib 基于 Rsbuild 实现,并完全复用 Rsbuild 的能力和生态系统
下图说明了 Rsbuild 与生态中其他工具之间的关系:
-
+
## 📚 快速上手
diff --git a/packages/core/README.md b/packages/core/README.md
index 0c65374c5..30872e0ae 100644
--- a/packages/core/README.md
+++ b/packages/core/README.md
@@ -1,10 +1,10 @@
-
+
# Rslib
-Rslib is a library development tool powered by [Rsbuild](https://rsbuild.dev). It allows library developers to leverage the knowledge and ecosystem of webpack and Rspack.
+Rslib is a library development tool powered by [Rsbuild](https://rsbuild.rs). It allows library developers to leverage the knowledge and ecosystem of webpack and Rspack.
## Documentation
diff --git a/packages/core/src/css/cssConfig.ts b/packages/core/src/css/cssConfig.ts
index 0c4028fbd..1e457aac3 100644
--- a/packages/core/src/css/cssConfig.ts
+++ b/packages/core/src/css/cssConfig.ts
@@ -11,7 +11,7 @@ const require = createRequire(import.meta.url);
export const RSLIB_CSS_ENTRY_FLAG = '__rslib_css__';
-// https://rsbuild.dev/config/output/css-modules#cssmodulesauto
+// https://rsbuild.rs/config/output/css-modules#cssmodulesauto
export type CssLoaderOptionsAuto = CSSLoaderOptions['modules'] extends infer T
? T extends { auto?: any }
? T['auto']
diff --git a/packages/create-rslib/README.md b/packages/create-rslib/README.md
index 0c65374c5..30872e0ae 100644
--- a/packages/create-rslib/README.md
+++ b/packages/create-rslib/README.md
@@ -1,10 +1,10 @@
-
+
# Rslib
-Rslib is a library development tool powered by [Rsbuild](https://rsbuild.dev). It allows library developers to leverage the knowledge and ecosystem of webpack and Rspack.
+Rslib is a library development tool powered by [Rsbuild](https://rsbuild.rs). It allows library developers to leverage the knowledge and ecosystem of webpack and Rspack.
## Documentation
diff --git a/packages/plugin-dts/README.md b/packages/plugin-dts/README.md
index af55b7c35..d85200dd4 100644
--- a/packages/plugin-dts/README.md
+++ b/packages/plugin-dts/README.md
@@ -1,5 +1,5 @@
-
+
# rsbuild-plugin-dts
@@ -62,7 +62,7 @@ The output directory of declaration files. The default value follows the priorit
1. The `distPath` value of the plugin options.
2. The `declarationDir` value in the `tsconfig.json` file.
-3. The [output.distPath.root](https://rsbuild.dev/config/output/dist-path) value of Rsbuild configuration.
+3. The [output.distPath.root](https://rsbuild.rs/config/output/dist-path) value of Rsbuild configuration.
```js
pluginDts({
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 50e3392ca..9d538bfe0 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -1108,8 +1108,8 @@ importers:
specifier: 2.0.0-beta.7
version: 2.0.0-beta.7(rspress@2.0.0-beta.7(@types/react@19.1.5)(acorn@8.14.1))
'@rstack-dev/doc-ui':
- specifier: 1.10.3
- version: 1.10.3(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
+ specifier: 1.10.5
+ version: 1.10.5(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
'@shikijs/transformers':
specifier: ^3.4.2
version: 3.4.2
@@ -2659,8 +2659,8 @@ packages:
resolution: {integrity: sha512-IZrArB0yjVB/xf+Qg89Tbf4fWkXybTCCDG3WoavZox4XJAxkti7kRNb1ZRzQWiKu/RfYfg97tcXpUtv+CeARLw==}
engines: {node: '>=18.0.0'}
- '@rstack-dev/doc-ui@1.10.3':
- resolution: {integrity: sha512-V3j7bMGlA5+Ii01LLu9htu3HEl3RqTcLoCYu63Caow7kczNDNIY77AGQThYUYekTHCfy4mGh0a9xN2xXudeBXg==}
+ '@rstack-dev/doc-ui@1.10.5':
+ resolution: {integrity: sha512-bZZcO1UMfYnNsmiJvM2U/DgD5zw0Mo91mYrmBlqI85i8ArtfoPGHoiZ2vFVIn6eDWVG77B0J8VxMM5ecSEfPNg==}
'@rushstack/node-core-library@5.13.1':
resolution: {integrity: sha512-5yXhzPFGEkVc9Fu92wsNJ9jlvdwz4RNb2bMso+/+TH0nMm1jDDDsOIf4l8GAkPxGuwPw5DH24RliWVfSPhlW/Q==}
@@ -9358,7 +9358,7 @@ snapshots:
react-dom: 19.1.0(react@19.1.0)
shiki: 3.4.2
- '@rstack-dev/doc-ui@1.10.3(react-dom@19.1.0(react@19.1.0))(react@19.1.0)':
+ '@rstack-dev/doc-ui@1.10.5(react-dom@19.1.0(react@19.1.0))(react@19.1.0)':
dependencies:
framer-motion: 12.11.3(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
transitivePeerDependencies:
diff --git a/tests/README.md b/tests/README.md
index aa485d818..ba11fdd36 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -61,13 +61,13 @@ Not applicable, Rslib will provide a more simple unencapsulated build boilerplat
Rslib could reuse the plugins from Rsbuild, which means the [official plugins](https://modernjs.dev/en/plugin/plugin-system/introduction.html#official-plugins) provided by Modern Module could be replaced by Rsbuild plugins.
-| Plugins | Status | Note |
-| -------------------------------------- | ------ | ----------------------------------------------------------------------------- |
-| @modern-js/plugin-module-import | 🟢 | Use https://rsbuild.dev/config/source/transform-import#sourcetransformimport. |
-| @modern-js/plugin-module-banner | 🟢 | BannerPlugin. |
-| @modern-js/plugin-module-node-polyfill | 🟢 | Use https://github.com/rspack-contrib/rsbuild-plugin-node-polyfill. |
-| @modern-js/plugin-module-polyfill | ⚪️ | Use https://rsbuild.dev/config/output/polyfill#outputpolyfill. |
-| @modern-js/plugin-module-babel | 🟢 | Use https://rsbuild.dev/plugins/list/plugin-babel. |
-| @modern-js/plugin-module-vue | ⚪️ | Use https://rsbuild.dev/plugins/list/plugin-vue. |
+| Plugins | Status | Note |
+| -------------------------------------- | ------ | ---------------------------------------------------------------------------- |
+| @modern-js/plugin-module-import | 🟢 | Use https://rsbuild.rs/config/source/transform-import#sourcetransformimport. |
+| @modern-js/plugin-module-banner | 🟢 | BannerPlugin. |
+| @modern-js/plugin-module-node-polyfill | 🟢 | Use https://github.com/rspack-contrib/rsbuild-plugin-node-polyfill. |
+| @modern-js/plugin-module-polyfill | ⚪️ | Use https://rsbuild.rs/config/output/polyfill#outputpolyfill. |
+| @modern-js/plugin-module-babel | 🟢 | Use https://rsbuild.rs/plugins/list/plugin-babel. |
+| @modern-js/plugin-module-vue | ⚪️ | Use https://rsbuild.rs/plugins/list/plugin-vue. |
##
diff --git a/website/README.md b/website/README.md
index ba46d68b6..b5966eb5e 100644
--- a/website/README.md
+++ b/website/README.md
@@ -1,6 +1,6 @@
# Rslib website
-This website is built with [Rspress](https://github.com/web-infra-dev/rspress), the document content can be written using markdown or mdx syntax. You can refer to the [Rspress Website](https://rspress.dev/) for detailed usage.
+This website is built with [Rspress](https://github.com/web-infra-dev/rspress), the document content can be written using markdown or mdx syntax. You can refer to the [Rspress Website](https://rspress.rs/) for detailed usage.
## Contributing
@@ -14,4 +14,4 @@ The same as Rspack: [Writing style guide](https://github.com/web-infra-dev/rspac
For images you use in the document, it's better to upload them to the [rspack-contrib/rstack-design-resources](https://github.com/rspack-contrib/rstack-design-resources) repository, so the size of the current repository doesn't get too big.
-After you upload the images there, they will be automatically deployed under the .
+After you upload the images there, they will be automatically deployed under the .
diff --git a/website/docs/en/blog/index.mdx b/website/docs/en/blog/index.mdx
index d1da20fde..388b6ebc9 100644
--- a/website/docs/en/blog/index.mdx
+++ b/website/docs/en/blog/index.mdx
@@ -11,4 +11,4 @@ Check here for the latest articles and release announcements about Rslib.
> May 14, 2025
-We are excited to introduce Rslib — **a library development tool based on Rspack**. Developed by ByteDance Web Infra Team, Rslib helps developers create JavaScript libraries and UI component libraries in a simple and intuitive way while enjoying the ultimate development experience brought by [Rspack](https://rspack.dev/) and [Rsbuild](https://rsbuild.dev/).
+We are excited to introduce Rslib — **a library development tool based on Rspack**. Developed by ByteDance Web Infra Team, Rslib helps developers create JavaScript libraries and UI component libraries in a simple and intuitive way while enjoying the ultimate development experience brought by [Rspack](https://rspack.rs/) and [Rsbuild](https://rsbuild.rs/).
diff --git a/website/docs/en/blog/introducing-rslib.mdx b/website/docs/en/blog/introducing-rslib.mdx
index 1cc188664..6216bc08c 100644
--- a/website/docs/en/blog/introducing-rslib.mdx
+++ b/website/docs/en/blog/introducing-rslib.mdx
@@ -9,9 +9,9 @@ import { ImageAlt } from '../../../theme/components/ImageAlt';
# Rslib: Build library with Rspack
-
+
-We are excited to introduce Rslib — **a library development tool based on Rspack**. Developed by ByteDance Web Infra Team, Rslib helps developers create JavaScript libraries and UI component libraries in a simple and intuitive way while enjoying the ultimate development experience brought by [Rspack](https://rspack.dev/) and [Rsbuild](https://rsbuild.dev/).
+We are excited to introduce Rslib — **a library development tool based on Rspack**. Developed by ByteDance Web Infra Team, Rslib helps developers create JavaScript libraries and UI component libraries in a simple and intuitive way while enjoying the ultimate development experience brought by [Rspack](https://rspack.rs/) and [Rsbuild](https://rsbuild.rs/).
> Repo:https://github.com/web-infra-dev/rslib
@@ -35,12 +35,12 @@ Facing these pain points, we hope the ideal library development tool would:
- **Shared Ecosystem:** Unify library building with application building configurations, reuse Rspack's prosperous community, and promote unified toolchain ecosystem development.
- **Performance First:** The underlying bundler is implemented in Rust, offering excellent build performance and improving developer experience.
-Therefore, we created Rslib. **Based on the well-designed configurations and plugins of [Rsbuild](https://rsbuild.dev)'s, it empowers library developers to take advantage of the extensive knowledge and ecosystem of webpack and Rspack, providing comprehensive library development features.**
+Therefore, we created Rslib. **Based on the well-designed configurations and plugins of [Rsbuild](https://rsbuild.rs)'s, it empowers library developers to take advantage of the extensive knowledge and ecosystem of webpack and Rspack, providing comprehensive library development features.**
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.
Multiple formats in one configuration file
Use publint to check package.json
- > For more plugin information, please refer to [Rsbuild Plugin Overview](https://rsbuild.dev/plugins/list/).
+ > For more plugin information, please refer to [Rsbuild Plugin Overview](https://rsbuild.rs/plugins/list/).
## Current status and version evolution
diff --git a/website/docs/en/config/lib/auto-extension.mdx b/website/docs/en/config/lib/auto-extension.mdx
index a8f512016..43c9d5f43 100644
--- a/website/docs/en/config/lib/auto-extension.mdx
+++ b/website/docs/en/config/lib/auto-extension.mdx
@@ -17,7 +17,7 @@ When `autoExtension` is set to `false`, the file extension will be default to `.
## Customize extension
-You can set `autoExtension` to `false` and use [output.filename](https://rsbuild.dev/config/output/filename) to customize the JavaScript output files.
+You can set `autoExtension` to `false` and use [output.filename](https://rsbuild.rs/config/output/filename) to customize the JavaScript output files.
```ts title="rslib.config.ts"
export default defineConfig({
diff --git a/website/docs/en/config/lib/banner.mdx b/website/docs/en/config/lib/banner.mdx
index 3ae63211b..073a122ac 100644
--- a/website/docs/en/config/lib/banner.mdx
+++ b/website/docs/en/config/lib/banner.mdx
@@ -43,14 +43,14 @@ Inject content into the top of each declaration output file.
## Notice
-The banner content in JavaScript and CSS file is based on the [BannerPlugin](https://rspack.dev/plugins/webpack/banner-plugin) of Rspack. You should notice the following points:
+The banner content in JavaScript and CSS file is based on the [BannerPlugin](https://rspack.rs/plugins/webpack/banner-plugin) of Rspack. You should notice the following points:
- `raw: true` is enabled by default, so the banner content will be injected as a raw string instead of wrapping in a comment. So if you want to inject a comment, you should add `/*` and `*/` or other comment syntax by yourself.
- The `stage` option is set to the stage after the JavaScript and CSS files are optimized, thus preventing the banner content from being optimized away.
## Customize banner content
-If the above default settings cannot meet your requirements, you can customize the banner content through `tools.rspack.plugins` to add a [BannerPlugin](https://rspack.dev/plugins/webpack/banner-plugin) instance with the corresponding options.
+If the above default settings cannot meet your requirements, you can customize the banner content through `tools.rspack.plugins` to add a [BannerPlugin](https://rspack.rs/plugins/webpack/banner-plugin) instance with the corresponding options.
```ts title="rslib.config.ts"
export default {
diff --git a/website/docs/en/config/lib/bundle.mdx b/website/docs/en/config/lib/bundle.mdx
index 6bf169d7f..bca0e41e0 100644
--- a/website/docs/en/config/lib/bundle.mdx
+++ b/website/docs/en/config/lib/bundle.mdx
@@ -13,7 +13,7 @@ We should specify the entry file for the build.
### bundle: true
-When `bundle` is set to `true`, the entry should be set to the entry file. The default entry in bundle mode is `src/index.(ts|js|tsx|jsx|mjs|cjs)`. You should make sure that the entry file exists, or customize entry through the [source.entry](https://rsbuild.dev/config/source/entry) configuration.
+When `bundle` is set to `true`, the entry should be set to the entry file. The default entry in bundle mode is `src/index.(ts|js|tsx|jsx|mjs|cjs)`. You should make sure that the entry file exists, or customize entry through the [source.entry](https://rsbuild.rs/config/source/entry) configuration.
**Example:**
diff --git a/website/docs/en/config/lib/footer.mdx b/website/docs/en/config/lib/footer.mdx
index 244467bd4..8924d624e 100644
--- a/website/docs/en/config/lib/footer.mdx
+++ b/website/docs/en/config/lib/footer.mdx
@@ -43,14 +43,14 @@ Inject content into the bottom of each declaration output file.
## Notice
-The footer content in JavaScript and CSS file is based on the [BannerPlugin](https://rspack.dev/plugins/webpack/banner-plugin) of Rspack. You should notice the following points:
+The footer content in JavaScript and CSS file is based on the [BannerPlugin](https://rspack.rs/plugins/webpack/banner-plugin) of Rspack. You should notice the following points:
- `raw: true` is enabled by default, so the footer content will be injected as a raw string instead of wrapping in a comment. So if you want to inject a comment, you should add `/*` and `*/` or other comment syntax by yourself.
- The `stage` option is set to the stage after the JavaScript and CSS files are optimized, thus preventing the footer content from being optimized away.
## Customize footer content
-If the above default settings cannot meet your requirements, you can customize the footer content through `tools.rspack.plugins` to add a [BannerPlugin](https://rspack.dev/plugins/webpack/banner-plugin) instance with the corresponding options.
+If the above default settings cannot meet your requirements, you can customize the footer content through `tools.rspack.plugins` to add a [BannerPlugin](https://rspack.rs/plugins/webpack/banner-plugin) instance with the corresponding options.
```ts title="rslib.config.ts"
export default {
diff --git a/website/docs/en/config/lib/format.mdx b/website/docs/en/config/lib/format.mdx
index 24f3e1a52..5c61eafcc 100644
--- a/website/docs/en/config/lib/format.mdx
+++ b/website/docs/en/config/lib/format.mdx
@@ -5,12 +5,12 @@
Specify the output format for the generated JavaScript output files.
-For different output formats, Rslib uses the following default value of [output.library.type](https://rspack.dev/config/output#outputlibrarytype) provided by Rspack:
+For different output formats, Rslib uses the following default value of [output.library.type](https://rspack.rs/config/output#outputlibrarytype) provided by Rspack:
-- `esm`:[modern-module](https://rspack.dev/config/output#type-modern-module)
-- `cjs`:[commonjs-static](https://rspack.dev/config/output#type-commonjs-static)
-- `umd`:[umd](https://rspack.dev/config/output#type-umd)
-- `iife`: [modern-module](https://rspack.dev/config/output#type-modern-module) with [output.iife](https://rspack.dev/config/output#outputiife) enabled.
+- `esm`:[modern-module](https://rspack.rs/config/output#type-modern-module)
+- `cjs`:[commonjs-static](https://rspack.rs/config/output#type-commonjs-static)
+- `umd`:[umd](https://rspack.rs/config/output#type-umd)
+- `iife`: [modern-module](https://rspack.rs/config/output#type-modern-module) with [output.iife](https://rspack.rs/config/output#outputiife) enabled.
See [Output Format](/guide/basic/output-format) and [Module Federation](/guide/advanced/module-federation) for more details.
diff --git a/website/docs/en/config/lib/id.mdx b/website/docs/en/config/lib/id.mdx
index 8ea94fc31..bff955d9b 100644
--- a/website/docs/en/config/lib/id.mdx
+++ b/website/docs/en/config/lib/id.mdx
@@ -7,7 +7,7 @@ Specify the library ID. The ID identifies the library and is useful when using t
:::tip
-Rslib uses Rsbuild's [environments](https://rsbuild.dev/guide/advanced/environments) feature to build multiple libraries in a single project under the hood. `lib.id` will be used as the key for the generated Rsbuild environment.
+Rslib uses Rsbuild's [environments](https://rsbuild.rs/guide/advanced/environments) feature to build multiple libraries in a single project under the hood. `lib.id` will be used as the key for the generated Rsbuild environment.
:::
diff --git a/website/docs/en/config/rsbuild/output.mdx b/website/docs/en/config/rsbuild/output.mdx
index 3e4caa249..d994cf67d 100644
--- a/website/docs/en/config/rsbuild/output.mdx
+++ b/website/docs/en/config/rsbuild/output.mdx
@@ -13,7 +13,7 @@ In Rslib, the default value for this option depends on [format](/config/lib/form
- When `format` is `cjs` or `esm`, the default value is `"auto"`.
- When `format` is `mf` or `umd`, the default value is `"/"`.
-When `output.assetPrefix` is set to `"auto"`, Rslib defaults to setting [importMode](https://rspack.dev/config/module#modulegeneratorassetimportmode) to `"preserve"`, which preserves the `import` or `require` statements for static assets in JavaScript files. Additionally, the static asset references in CSS files remain as relative paths, see [Import static assets](/guide/advanced/static-assets) for more details.
+When `output.assetPrefix` is set to `"auto"`, Rslib defaults to setting [importMode](https://rspack.rs/config/module#modulegeneratorassetimportmode) to `"preserve"`, which preserves the `import` or `require` statements for static assets in JavaScript files. Additionally, the static asset references in CSS files remain as relative paths, see [Import static assets](/guide/advanced/static-assets) for more details.
When `output.assetPrefix` is set to a specific path, the static asset import statements in JavaScript files will no longer be preserved and will be replaced with URLs prefixed by that path. Additionally, the static asset paths in CSS files will be substituted with paths that include this prefix.
@@ -27,7 +27,7 @@ Whether to clean up all files under the output directory before the build starts
## output.copy
-Copies the specified file or directory to the dist directory, implemented based on [rspack.CopyRspackPlugin](https://rspack.dev/plugins/rspack/copy-rspack-plugin).
+Copies the specified file or directory to the dist directory, implemented based on [rspack.CopyRspackPlugin](https://rspack.rs/plugins/rspack/copy-rspack-plugin).
## output.cssModules
@@ -119,7 +119,7 @@ Configure how to handle the legal comment.
## output.manifest
-Whether to generate a manifest file that contains information of all assets, and the mapping relationship between [entry module](https://rsbuild.dev/config/source/entry) and assets.
+Whether to generate a manifest file that contains information of all assets, and the mapping relationship between [entry module](https://rsbuild.rs/config/source/entry) and assets.
## output.minify
diff --git a/website/docs/en/config/rsbuild/plugins.mdx b/website/docs/en/config/rsbuild/plugins.mdx
index a5d168470..dc0afa71c 100644
--- a/website/docs/en/config/rsbuild/plugins.mdx
+++ b/website/docs/en/config/rsbuild/plugins.mdx
@@ -14,7 +14,7 @@ Currently, some plugins have not been adapted to the [bundleless](/guide/basic/o
## Using plugins
-You can register Rsbuild plugins in `rslib.config.*` using the `plugins` option, see [Rsbuild - plugins](https://rsbuild.dev/config/plugins).
+You can register Rsbuild plugins in `rslib.config.*` using the `plugins` option, see [Rsbuild - plugins](https://rsbuild.rs/config/plugins).
```ts title="rslib.config.ts"
import { defineConfig } from '@rslib/core';
@@ -33,8 +33,8 @@ The following are official plugins that can be used in Rsbuild, and applicable t
Plugins available for React:
-- [React Plugin](https://rsbuild.dev/plugins/list/plugin-react): Provides support for React.
-- [SVGR Plugin](https://rsbuild.dev/plugins/list/plugin-svgr): Support convert SVG to React components.
+- [React Plugin](https://rsbuild.rs/plugins/list/plugin-react): Provides support for React.
+- [SVGR Plugin](https://rsbuild.rs/plugins/list/plugin-svgr): Support convert SVG to React components.
- [Styled Components Plugin](https://github.com/rsbuild-contrib/rsbuild-plugin-styled-components): Provide compile-time support for styled-components.
### For Vue
@@ -42,7 +42,7 @@ Plugins available for React:
Plugins available for Vue:
- [Vue Plugin](https://github.com/rspack-contrib/rsbuild-plugin-unplugin-vue): Based on [unplugin-vue](https://github.com/unplugin/unplugin-vue), provides support for Vue 3 SFC (Single File Components).
-- [Vue Plugin](https://rsbuild.dev/plugins/list/plugin-vue): Based on [vue-loader](https://github.com/vuejs/vue-loader), provides support for Vue 3 SFC (Single File Components) (Recommend using the implementation based on [unplugin-vue](https://github.com/unplugin/unplugin-vue), as vue-loader is no longer maintained).
+- [Vue Plugin](https://rsbuild.rs/plugins/list/plugin-vue): Based on [vue-loader](https://github.com/vuejs/vue-loader), provides support for Vue 3 SFC (Single File Components) (Recommend using the implementation based on [unplugin-vue](https://github.com/unplugin/unplugin-vue), as vue-loader is no longer maintained).
- [Vue JSX Plugin](https://github.com/rspack-contrib/rsbuild-plugin-vue-jsx): Provides support for Vue 3 JSX / TSX syntax.
- [Vue2 Plugin](https://github.com/rspack-contrib/rsbuild-plugin-vue2): Provides support for Vue 2 SFC (Single File Components).
- [Vue2 JSX Plugin](https://github.com/rspack-contrib/rsbuild-plugin-vue2-jsx): Provides support for Vue 2 JSX / TSX syntax.
@@ -51,28 +51,28 @@ Plugins available for Vue:
Plugins available for Preact:
-- [Preact Plugin](https://rsbuild.dev/plugins/list/plugin-preact): Provides support for Preact.
+- [Preact Plugin](https://rsbuild.rs/plugins/list/plugin-preact): Provides support for Preact.
### For Svelte
Plugins available for Svelte:
-- [Svelte Plugin](https://rsbuild.dev/plugins/list/plugin-svelte): Provides support for Svelte components (`.svelte` files).
+- [Svelte Plugin](https://rsbuild.rs/plugins/list/plugin-svelte): Provides support for Svelte components (`.svelte` files).
### For Solid
Plugins available for Solid:
-- [Solid Plugin](https://rsbuild.dev/plugins/list/plugin-solid): Provides support for Solid.
+- [Solid Plugin](https://rsbuild.rs/plugins/list/plugin-solid): Provides support for Solid.
### Common
The following are common framework-agnostic plugins:
-- [Babel Plugin](https://rsbuild.dev/plugins/list/plugin-babel): Provides support for Babel transpilation capabilities.
-- [Sass Plugin](https://rsbuild.dev/plugins/list/plugin-sass): Use Sass as the CSS preprocessor.
-- [Less Plugin](https://rsbuild.dev/plugins/list/plugin-less): Use Less as the CSS preprocessor.
-- [Stylus Plugin](https://rsbuild.dev/plugins/list/plugin-stylus): Use Stylus as the CSS preprocessor.
+- [Babel Plugin](https://rsbuild.rs/plugins/list/plugin-babel): Provides support for Babel transpilation capabilities.
+- [Sass Plugin](https://rsbuild.rs/plugins/list/plugin-sass): Use Sass as the CSS preprocessor.
+- [Less Plugin](https://rsbuild.rs/plugins/list/plugin-less): Use Less as the CSS preprocessor.
+- [Stylus Plugin](https://rsbuild.rs/plugins/list/plugin-stylus): Use Stylus as the CSS preprocessor.
- [ESLint Plugin](https://github.com/rspack-contrib/rsbuild-plugin-eslint): Run ESLint checks during the compilation.
- [Type Check Plugin](https://github.com/rspack-contrib/rsbuild-plugin-type-check): Run TypeScript type checker on a separate process.
- [publint Plugin](https://github.com/rspack-contrib/rsbuild-plugin-publint): Run `publint` to lint npm packages after the build.
diff --git a/website/docs/en/config/rsbuild/resolve.mdx b/website/docs/en/config/rsbuild/resolve.mdx
index b5df933fe..749fa16db 100644
--- a/website/docs/en/config/rsbuild/resolve.mdx
+++ b/website/docs/en/config/rsbuild/resolve.mdx
@@ -10,7 +10,7 @@ Control the priority between the `paths` option in `tsconfig.json` and the `reso
## resolve.alias
-Set the alias for the module path, which is used to simplify the import path or redirect the module reference, similar to the [resolve.alias](https://rspack.dev/config/resolve#resolvealias) config of Rspack.
+Set the alias for the module path, which is used to simplify the import path or redirect the module reference, similar to the [resolve.alias](https://rspack.rs/config/resolve#resolvealias) config of Rspack.
For TypeScript projects, you only need to configure [compilerOptions.paths](https://www.typescriptlang.org/tsconfig/#paths) in the `tsconfig.json` file. Rslib will automatically recognize it, so there is no need to configure the `resolve.alias` option separately.
diff --git a/website/docs/en/config/rsbuild/source.mdx b/website/docs/en/config/rsbuild/source.mdx
index 241d2f87d..a6cf52c57 100644
--- a/website/docs/en/config/rsbuild/source.mdx
+++ b/website/docs/en/config/rsbuild/source.mdx
@@ -48,7 +48,7 @@ Check out the [lib.bundle](/config/lib/bundle#set-entry) to learn more about how
## source.exclude
-Exclude JavaScript or TypeScript files that do not need to be transformed by [SWC](https://rsbuild.dev/guide/configuration/swc).
+Exclude JavaScript or TypeScript files that do not need to be transformed by [SWC](https://rsbuild.rs/guide/configuration/swc).
::: note
@@ -56,7 +56,7 @@ Files configured in `source.exclude` will not be transformed by SWC, but the ref
If you want certain files not to be bundled into the outputs, you can use the following methods:
-- **bundle mode**: Use Rspack's [IgnorePlugin](https://rspack.dev/plugins/webpack/ignore-plugin).
+- **bundle mode**: Use Rspack's [IgnorePlugin](https://rspack.rs/plugins/webpack/ignore-plugin).
- **bundleless mode**: Use `source.entry` to configure the corresponding glob expression, refer to [Set entry](/config/lib/bundle#bundle-false).
:::
diff --git a/website/docs/en/config/rsbuild/tools.mdx b/website/docs/en/config/rsbuild/tools.mdx
index fced05046..19cee2f42 100644
--- a/website/docs/en/config/rsbuild/tools.mdx
+++ b/website/docs/en/config/rsbuild/tools.mdx
@@ -22,7 +22,7 @@ Rsbuild uses [css-loader](https://github.com/webpack-contrib/css-loader) by defa
## tools.lightningcssLoader
-You can set the options for [builtin:lightningcss-loader](https://rspack.dev/guide/features/builtin-lightningcss-loader) through `tools.lightningcssLoader`.
+You can set the options for [builtin:lightningcss-loader](https://rspack.rs/guide/features/builtin-lightningcss-loader) through `tools.lightningcssLoader`.
## tools.postcss
@@ -30,7 +30,7 @@ Rsbuild integrates PostCSS by default, you can configure [postcss-loader](https:
## tools.rspack
-`tools.rspack` is used to configure [Rspack](https://rspack.dev/config/index).
+`tools.rspack` is used to configure [Rspack](https://rspack.rs/config/index).
## tools.styleLoader
@@ -38,4 +38,4 @@ The config of [style-loader](https://github.com/webpack-contrib/style-loader) ca
## tools.swc
-You can set the options of [builtin:swc-loader](https://rspack.dev/guide/features/builtin-swc-loader) through `tools.swc`.
+You can set the options of [builtin:swc-loader](https://rspack.rs/guide/features/builtin-swc-loader) through `tools.swc`.
diff --git a/website/docs/en/guide/advanced/output-compatibility.mdx b/website/docs/en/guide/advanced/output-compatibility.mdx
index 8ce745385..81bbc16ea 100644
--- a/website/docs/en/guide/advanced/output-compatibility.mdx
+++ b/website/docs/en/guide/advanced/output-compatibility.mdx
@@ -15,7 +15,7 @@ By default, the syntax is set to `ESNext`, which will only supports only the lat
## Polyfill
-Before dealing with compatibility issues, it is recommended that you understand the following background knowledge to better handle related issues. Check out the background knowledge on [syntax transpilation and API polyfill](https://rsbuild.dev/guide/advanced/browser-compatibility#syntax-downgrade-and-api-downgrade).
+Before dealing with compatibility issues, it is recommended that you understand the following background knowledge to better handle related issues. Check out the background knowledge on [syntax transpilation and API polyfill](https://rsbuild.rs/guide/advanced/browser-compatibility#syntax-downgrade-and-api-downgrade).
### Browser
@@ -25,7 +25,7 @@ Note that this plugin does not transform your code syntax, it only injects polyf
#### Set up
-The polyfill relies on Babel to inject the polyfill code, so you need to install the [Rsbuild Babel plugin](https://rsbuild.dev/plugins/list/plugin-babel) and [babel-plugin-polyfill-corejs3](https://www.npmjs.com/package/babel-plugin-polyfill-corejs3) to inject the polyfill code.
+The polyfill relies on Babel to inject the polyfill code, so you need to install the [Rsbuild Babel plugin](https://rsbuild.rs/plugins/list/plugin-babel) and [babel-plugin-polyfill-corejs3](https://www.npmjs.com/package/babel-plugin-polyfill-corejs3) to inject the polyfill code.
diff --git a/website/docs/en/guide/advanced/static-assets.mdx b/website/docs/en/guide/advanced/static-assets.mdx
index 81a496a37..996f32606 100644
--- a/website/docs/en/guide/advanced/static-assets.mdx
+++ b/website/docs/en/guide/advanced/static-assets.mdx
@@ -53,7 +53,7 @@ console.log(logo);
-
+
@@ -72,7 +72,7 @@ console.log(logo_namespaceObject);
-
+
@@ -98,7 +98,7 @@ export { logo_namespaceObject as default };
-
+
@@ -139,7 +139,7 @@ The following is an example of usage, assuming the source code is as follows:
- The dependencies varies for each framework, please refer to the [Storybook Rsbuild documentation](https://storybook.rsbuild.dev/guide/framework.html) for details. In this React example, we will install [storybook-react-rsbuild](https://www.npmjs.com/package/storybook-react-rsbuild) as the framework integration.
+ The dependencies varies for each framework, please refer to the [Storybook Rsbuild documentation](https://storybook.rsbuild.rs/guide/framework.html) for details. In this React example, we will install [storybook-react-rsbuild](https://www.npmjs.com/package/storybook-react-rsbuild) as the framework integration.
@@ -95,7 +95,7 @@ npx storybook dev // development mode
npx storybook build // build static files
```
-Check out more details in the [Storybook Rsbuild documentation](https://storybook.rsbuild.dev/) and the [Storybook documentation](https://storybook.js.org/docs/react/get-started/introduction).
+Check out more details in the [Storybook Rsbuild documentation](https://storybook.rsbuild.rs/) and the [Storybook documentation](https://storybook.js.org/docs/react/get-started/introduction).
## Example
diff --git a/website/docs/en/guide/advanced/svgr-files.mdx b/website/docs/en/guide/advanced/svgr-files.mdx
index b52cc365d..eacd512c0 100644
--- a/website/docs/en/guide/advanced/svgr-files.mdx
+++ b/website/docs/en/guide/advanced/svgr-files.mdx
@@ -2,7 +2,7 @@
By default, Rslib treats SVG images as static assets.
-By adding the [@rsbuild/plugin-svgr](https://rsbuild.dev/plugins/list/plugin-svgr) plugin, Rslib supports transforming SVG to React components via [SVGR](https://react-svgr.com/).
+By adding the [@rsbuild/plugin-svgr](https://rsbuild.rs/plugins/list/plugin-svgr) plugin, Rslib supports transforming SVG to React components via [SVGR](https://react-svgr.com/).
## Quick start
@@ -30,7 +30,7 @@ export default {
### Bundle mode
-In bundle mode, all usages supported by [@rsbuild/plugin-svgr](https://rsbuild.dev/plugins/list/plugin-svgr) are available in Rslib. The only difference is that when using an SVG file in URL form, Rslib will retain the `import` statement for the static asset in the output according to [Import static assets](/guide/advanced/static-assets).
+In bundle mode, all usages supported by [@rsbuild/plugin-svgr](https://rsbuild.rs/plugins/list/plugin-svgr) are available in Rslib. The only difference is that when using an SVG file in URL form, Rslib will retain the `import` statement for the static asset in the output according to [Import static assets](/guide/advanced/static-assets).
Here is an example of usage:
@@ -52,8 +52,8 @@ console.log(logoURL);
`@rsbuild/plugin-svgr` also supports default import and mixed import:
-- Enable default import by setting [svgrOptions.exportType](https://rsbuild.dev/plugins/list/plugin-svgr#svgroptionsexporttype) to `'default'`.
-- Enable mixed import through the [mixedImport](https://rsbuild.dev/plugins/list/plugin-svgr#mixedimport) option to use both default and named import.
+- Enable default import by setting [svgrOptions.exportType](https://rsbuild.rs/plugins/list/plugin-svgr#svgroptionsexporttype) to `'default'`.
+- Enable mixed import through the [mixedImport](https://rsbuild.rs/plugins/list/plugin-svgr#mixedimport) option to use both default and named import.
### Bundleless mode
@@ -61,7 +61,7 @@ In bundleless mode, since each file undergoes code transformation independently,
#### Named import
-`@rsbuild/plugin-svgr` supports named import of `ReactComponent` to use SVGR. You need to set [svgrOptions.exportType](https://rsbuild.dev/plugins/list/plugin-svgr#svgroptionsexporttype) to `'named'`.
+`@rsbuild/plugin-svgr` supports named import of `ReactComponent` to use SVGR. You need to set [svgrOptions.exportType](https://rsbuild.rs/plugins/list/plugin-svgr#svgroptionsexporttype) to `'named'`.
```js
pluginSvgr({
@@ -79,8 +79,8 @@ export const App = () => ;
All `.svg` files will be transformed into React components. At this time, you can:
-- Exclude files that do not need to be transformed by setting [exclude](https://rsbuild.dev/plugins/list/plugin-svgr#exclude).
-- Change to default export by setting [svgrOptions.exportType](https://rsbuild.dev/plugins/list/plugin-svgr#svgroptionsexporttype) to `'default'`.
+- Exclude files that do not need to be transformed by setting [exclude](https://rsbuild.rs/plugins/list/plugin-svgr#exclude).
+- Change to default export by setting [svgrOptions.exportType](https://rsbuild.rs/plugins/list/plugin-svgr#svgroptionsexporttype) to `'default'`.
#### Mixed import
@@ -104,4 +104,4 @@ console.log(logoUrl); // -> string
console.log(Logo); // -> React component
```
-For more information, refer to the [mixedImport](https://rsbuild.dev/plugins/list/plugin-svgr#mixedimport) option.
+For more information, refer to the [mixedImport](https://rsbuild.rs/plugins/list/plugin-svgr#mixedimport) option.
diff --git a/website/docs/en/guide/basic/cli.mdx b/website/docs/en/guide/basic/cli.mdx
index 0111ef8c6..8ed22fa3f 100644
--- a/website/docs/en/guide/basic/cli.mdx
+++ b/website/docs/en/guide/basic/cli.mdx
@@ -29,8 +29,8 @@ Rslib CLI provides several common flags that can be used with all commands:
| Flag | Description |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `-c, --config ` | Specify the configuration file, can be a relative or absolute path, see [Specify config file](/guide/basic/configure-rslib#specify-config-file) |
-| `--env-dir ` | Specify the directory to load `.env` files, see [Rsbuild - Env directory](https://rsbuild.dev/guide/advanced/env-vars#env-directory) |
-| `--env-mode ` | Specify the env mode to load the `.env.[mode]` file, see [Rsbuild - Env mode](https://rsbuild.dev/guide/advanced/env-vars#env-mode) |
+| `--env-dir ` | Specify the directory to load `.env` files, see [Rsbuild - Env directory](https://rsbuild.rs/guide/advanced/env-vars#env-directory) |
+| `--env-mode ` | Specify the env mode to load the `.env.[mode]` file, see [Rsbuild - Env mode](https://rsbuild.rs/guide/advanced/env-vars#env-mode) |
| `-h, --help` | Display help for command |
| `--lib ` | Specify the library to run commands (repeatable, e.g. `--lib esm --lib cjs`), see [lib.id](/config/lib/id) to learn how to get or set the ID of the library |
| `-r, --root ` | Specify the project root directory, can be an absolute path or a path relative to cwd |
@@ -51,7 +51,7 @@ Options:
Rslib supports injecting env variables or expressions into the code during build, which is helpful for distinguishing the running environment or replacing constants.
-You can see more details in [Rsbuild - Environment variables](https://rsbuild.dev/guide/advanced/env-vars).
+You can see more details in [Rsbuild - Environment variables](https://rsbuild.rs/guide/advanced/env-vars).
::: note
diff --git a/website/docs/en/guide/basic/configure-rslib.mdx b/website/docs/en/guide/basic/configure-rslib.mdx
index d61b411fb..583a67751 100644
--- a/website/docs/en/guide/basic/configure-rslib.mdx
+++ b/website/docs/en/guide/basic/configure-rslib.mdx
@@ -62,7 +62,7 @@ export default {
};
```
-Rslib will generate the [environments](https://rsbuild.dev/config/environments) configuration of Rsbuild internally, please refer to [Configuration Debug](#configuration-debug) to view the final generated configuration.
+Rslib will generate the [environments](https://rsbuild.rs/config/environments) configuration of Rsbuild internally, please refer to [Configuration Debug](#configuration-debug) to view the final generated configuration.
You can also refer to the [Configuration Overview](/config/) page to view the detailed introduction of all configurations.
@@ -79,7 +79,7 @@ When you use the CLI of Rslib, Rslib will automatically read the configuration f
We recommend using the `.mjs` or `.ts` format for the configuration file and importing the `defineConfig` utility function from `@rslib/core`. It provides friendly TypeScript type hints and autocompletion, which can help you avoid errors in the configuration.
-For example, in `rslib.config.ts`, you can define the Rslib [syntax](/config/lib/syntax) configuration and the Rsbuild [output.target](https://rsbuild.dev/config/output/target#outputtarget) configuration:
+For example, in `rslib.config.ts`, you can define the Rslib [syntax](/config/lib/syntax) configuration and the Rsbuild [output.target](https://rsbuild.rs/config/output/target#outputtarget) configuration:
```ts title="rslib.config.ts"
import { defineConfig } from '@rslib/core';
@@ -154,13 +154,13 @@ export default defineConfig({
Rslib allows you to use most of the Rsbuild configurations. Currently, the `environments` config is not supported because it is generated internally by Rslib.
- Refer to [Rsbuild Configuration](/config/rsbuild/) for common Rsbuild configurations.
-- Refer to [Rsbuild Documentation](https://rsbuild.dev/config/index#config-overview) for all Rsbuild configurations.
+- Refer to [Rsbuild Documentation](https://rsbuild.rs/config/index#config-overview) for all Rsbuild configurations.
## Configure Rspack
Rslib is built on top of Rsbuild and Rsbuild supports directly modifying the Rspack configuration object and also supports modifying the built-in Rspack configuration of Rsbuild through `rspack-chain`. This means you can configure Rspack related configurations in an Rslib project as well.
-For more details, refer to [Configure Rspack](https://rsbuild.dev/guide/basic/configure-rspack).
+For more details, refer to [Configure Rspack](https://rsbuild.rs/guide/basic/configure-rspack).
## Configuration debug
diff --git a/website/docs/en/guide/basic/output-format.mdx b/website/docs/en/guide/basic/output-format.mdx
index 4fe012450..064ded376 100644
--- a/website/docs/en/guide/basic/output-format.mdx
+++ b/website/docs/en/guide/basic/output-format.mdx
@@ -142,7 +142,7 @@ MF stands for Module Federation.
The iife format stands for "immediately-invoked function expression" and is intended to be run in the browser. Wrapping your code in a function expression ensures that any variables in your code don't accidentally conflict with variables in the global scope. If your entry point has exports that you want to expose as a global in the browser, you can configure that global's name using the global name setting.
-In IIFE format, [output.globalObject](https://rspack.dev/config/output#outputglobalobject) is set to [globalThis](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis) by default. The `import` statements that match [externals](/config/rsbuild/output#outputexternals) in the source code will be transformed to access properties through `globalThis`. You can override [output.globalObject](https://rspack.dev/config/output#outputglobalobject) to any value.
+In IIFE format, [output.globalObject](https://rspack.rs/config/output#outputglobalobject) is set to [globalThis](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis) by default. The `import` statements that match [externals](/config/rsbuild/output#outputexternals) in the source code will be transformed to access properties through `globalThis`. You can override [output.globalObject](https://rspack.rs/config/output#outputglobalobject) to any value.
When specifying the `iife` format, the source code and corresponding output are as follows:
diff --git a/website/docs/en/guide/basic/output-structure.mdx b/website/docs/en/guide/basic/output-structure.mdx
index c1c42c75b..28ab1421e 100644
--- a/website/docs/en/guide/basic/output-structure.mdx
+++ b/website/docs/en/guide/basic/output-structure.mdx
@@ -8,7 +8,7 @@ Bundle refers to the process of packaging the build outputs, which may be a sing
Bundleless, on the other hand, means that each source file is compiled and built separately, but not bundled together. Each output file can be found with its corresponding source code file. The process of bundleless build can also be understood as the process of code transformation of source files only.
-
+
They have their own benefits.
diff --git a/website/docs/en/guide/faq/features.mdx b/website/docs/en/guide/faq/features.mdx
index 84c14f764..fc3ceb3b3 100644
--- a/website/docs/en/guide/faq/features.mdx
+++ b/website/docs/en/guide/faq/features.mdx
@@ -118,7 +118,7 @@ export default {
### How to preserve module variables such as `__webpack_hash__` in the source code when generating outputs?
-Rslib based on Rspack will transform [module variables](https://rspack.dev/api/runtime-api/module-variables) like `__webpack_hash__`, `__webpack_nonce__`, `__webpack_public_path__`, etc. to runtime code containing `__webpack_require__` by default during build process. If you need to preserve these module variables in the outputs, you can configure [source.define](/config/rsbuild/source#sourcedefine) as follows:
+Rslib based on Rspack will transform [module variables](https://rspack.rs/api/runtime-api/module-variables) like `__webpack_hash__`, `__webpack_nonce__`, `__webpack_public_path__`, etc. to runtime code containing `__webpack_require__` by default during build process. If you need to preserve these module variables in the outputs, you can configure [source.define](/config/rsbuild/source#sourcedefine) as follows:
1. Replace the module variables that need to be preserved in the source code with a unique name, such as `__webpack_hash__` with `WEBPACK_HASH`, `__webpack_nonce__` with `WEBPACK_NONCE`, `__webpack_public_path__` with `WEBPACK_PUBLIC_PATH`, etc.
diff --git a/website/docs/en/guide/solution/index.mdx b/website/docs/en/guide/solution/index.mdx
index d29b867dc..6918dfc11 100644
--- a/website/docs/en/guide/solution/index.mdx
+++ b/website/docs/en/guide/solution/index.mdx
@@ -4,7 +4,7 @@ In this chapter, we will introduce how to use Rslib to development libraries for
## Browser target
-When developing a library that runs in the browser, you can package it in both [ESM](/guide/basic/output-format#esm--cjs) and [CJS](/guide/basic/output-format#esm--cjs) formats for integration with application bundlers. Configuring the package [conditional exports](https://nodejs.org/api/packages.html#conditional-exports) to ESM output allows for better tree shaking. Additionally, you can create [UMD](/guide/basic/output-format#umd) format output for direct browser use and even generate [Module Federation ](/guide/advanced/module-federation) formats for dynamic loading by other applications. Configure [Browserslist](https://rsbuild.dev/guide/advanced/browserslist) according to the target browser support to determine the downgrade syntax of the output, or add a [polyfill](/guide/advanced/output-compatibility) for API compatibility.
+When developing a library that runs in the browser, you can package it in both [ESM](/guide/basic/output-format#esm--cjs) and [CJS](/guide/basic/output-format#esm--cjs) formats for integration with application bundlers. Configuring the package [conditional exports](https://nodejs.org/api/packages.html#conditional-exports) to ESM output allows for better tree shaking. Additionally, you can create [UMD](/guide/basic/output-format#umd) format output for direct browser use and even generate [Module Federation ](/guide/advanced/module-federation) formats for dynamic loading by other applications. Configure [Browserslist](https://rsbuild.rs/guide/advanced/browserslist) according to the target browser support to determine the downgrade syntax of the output, or add a [polyfill](/guide/advanced/output-compatibility) for API compatibility.
When publishing to npm, you can choose not to [minify](/config/rsbuild/output#outputminify) your code or to minify it while providing a [sourcemap](/config/rsbuild/output#outputsourcemap) to enhance the debugging experience for users of your library. For styling, you can use CSS, or CSS pre-processors like Sass, Less, or Stylus, or apply PostCSS for CSS post-processing. Tools like Tailwind CSS can also help in building your styles. Using CSS Modules to create CSS modules is another option.
diff --git a/website/docs/en/guide/solution/react.mdx b/website/docs/en/guide/solution/react.mdx
index ba8130be5..3c2b9e306 100644
--- a/website/docs/en/guide/solution/react.mdx
+++ b/website/docs/en/guide/solution/react.mdx
@@ -23,7 +23,7 @@ Then select `React` when prompted to "Select template".
To develop a React library, you need to set the [target](/config/rsbuild/output#outputtarget) to `"web"` in `rslib.config.ts`. This is crucial because Rslib sets the `target` to `"node"` by default, which differs from the default target of Rsbuild.
-To compile React (JSX and TSX), you need to register the Rsbuild [React Plugin](https://rsbuild.dev/plugins/list/plugin-react). The plugin will automatically add the necessary configuration for React builds.
+To compile React (JSX and TSX), you need to register the Rsbuild [React Plugin](https://rsbuild.rs/plugins/list/plugin-react). The plugin will automatically add the necessary configuration for React builds.
For example, register in `rslib.config.ts`:
@@ -52,7 +52,7 @@ React introduced a [new JSX transform](https://legacy.reactjs.org/blog/2020/09/2
By default, Rsbuild uses the new JSX transform, which is `runtime: 'automatic'`. It requires at least React `16.14.0` or higher. The `peerDependencies` should be declared as `"react": ">=16.14.0"`.
-To change the JSX transform, you can pass the [swcReactOptions](https://rsbuild.dev/plugins/list/plugin-react#swcreactoptionsruntime) option to the React plugin. For example, to use the classic runtime:
+To change the JSX transform, you can pass the [swcReactOptions](https://rsbuild.rs/plugins/list/plugin-react#swcreactoptionsruntime) option to the React plugin. For example, to use the classic runtime:
```ts title="rslib.config.ts"
import { pluginReact } from '@rsbuild/plugin-react';
@@ -113,5 +113,5 @@ Read [Import SVGR](/guide/advanced/svgr-files) for more details.
## Further reading
-- [Rsbuild React Plugin](https://rsbuild.dev/plugins/list/plugin-react#swcreactoptionsruntime)
+- [Rsbuild React Plugin](https://rsbuild.rs/plugins/list/plugin-react#swcreactoptionsruntime)
- [SWC Compilation - jsc.transform.react](https://swc.rs/docs/configuration/compilation#jsctransformreact)
diff --git a/website/docs/en/guide/start/glossary.mdx b/website/docs/en/guide/start/glossary.mdx
index df0fa3a9f..e618ebb54 100644
--- a/website/docs/en/guide/start/glossary.mdx
+++ b/website/docs/en/guide/start/glossary.mdx
@@ -27,4 +27,4 @@ Bundleless means that each source file is compiled and built separately, but not
## More
-See more glossary in [Rsbuild - Glossary](https://rsbuild.dev/guide/start/glossary) and [Rspack - Glossary](https://rspack.dev/misc/glossary).
+See more glossary in [Rsbuild - Glossary](https://rsbuild.rs/guide/start/glossary) and [Rspack - Glossary](https://rspack.rs/misc/glossary).
diff --git a/website/docs/en/guide/start/index.mdx b/website/docs/en/guide/start/index.mdx
index 58562649e..bd4bd73f1 100644
--- a/website/docs/en/guide/start/index.mdx
+++ b/website/docs/en/guide/start/index.mdx
@@ -1,6 +1,6 @@
# Introduction
-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.
+Rslib is a library development tool that leverages the well-designed configurations and plugins of [Rsbuild](https://rsbuild.rs), empowering library developers to take advantage of the extensive knowledge and ecosystem of webpack and Rspack.
Rslib provides a comprehensive set of build features for library development, including:
@@ -25,7 +25,7 @@ In the future, Rslib will explore additional possibilities by leveraging the new
Rslib has the following features:
- **Easy to Configure**: Rslib aims to simplify library development by offering ready-to-use build capabilities, enabling developers to kickstart their library projects with minimal configuration.
-- **Performance Oriented**: Rslib 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.
+- **Performance Oriented**: Rslib integrates high-performance Rust-based tools from the community, including [Rspack](https://rspack.rs/), [SWC](https://swc.rs/) and [Lightning CSS](https://lightningcss.dev/), to deliver first-class build speed and development experience.
- **Plugin Ecosystem**: Powered by Rsbuild, Rslib benefits from a lightweight plugin system and a collection of high-quality official plugins. Furthermore, Rsbuild's compatibility with most webpack plugins and all Rspack plugins allows library developers to seamlessly integrate existing community or in-house plugins into their library projects.
## 🎯 Ecosystem
@@ -34,7 +34,7 @@ Rslib is implemented based on Rsbuild and fully reuses the capabilities and ecos
The following diagram illustrates the relationship between Rslib and other tools in the ecosystem:
-
+
## 🦀 Rstack
diff --git a/website/docs/en/shared/components/MF.mdx b/website/docs/en/shared/components/MF.mdx
index 9fbaa0a5a..274adabdf 100644
--- a/website/docs/en/shared/components/MF.mdx
+++ b/website/docs/en/shared/components/MF.mdx
@@ -1,3 +1,3 @@
Module Federation is an architectural pattern for JavaScript application decomposition (similar to microservices on the server-side), allowing you to share code and resources between multiple JavaScript applications (or micro-frontends).
-See [Module Federation](https://rsbuild.dev/guide/advanced/module-federation) for more details.
+See [Module Federation](https://rsbuild.rs/guide/advanced/module-federation) for more details.
diff --git a/website/docs/public/netlify.toml b/website/docs/public/netlify.toml
index e48b5289e..0a5cfeda5 100644
--- a/website/docs/public/netlify.toml
+++ b/website/docs/public/netlify.toml
@@ -1,6 +1,6 @@
-# Redirect lib.rsbuild.dev to rslib.rs
+# Redirect lib.rsbuild.rs to rslib.rs
[[redirects]]
-from = "https://lib.rsbuild.dev/*"
+from = "https://lib.rsbuild.rs/*"
to = "https://rslib.rs/:splat"
status = 301
force = true
diff --git a/website/docs/zh/blog/index.mdx b/website/docs/zh/blog/index.mdx
index 8ccb63add..4eb5eae99 100644
--- a/website/docs/zh/blog/index.mdx
+++ b/website/docs/zh/blog/index.mdx
@@ -11,4 +11,4 @@ sidebar: false
> 2025 年 5 月 14 日
-我们很高兴地向大家介绍 Rslib —— **一款基于 Rspack 的库开发工具**。Rslib 由字节跳动 Web Infra 团队开发,能够帮助开发者以简单直观的方式创建 JavaScript 库和 UI 组件库,并享受 [Rspack](https://rspack.dev/zh/) 和 [Rsbuild](https://rsbuild.dev/zh/) 带来的极致开发体验。
+我们很高兴地向大家介绍 Rslib —— **一款基于 Rspack 的库开发工具**。Rslib 由字节跳动 Web Infra 团队开发,能够帮助开发者以简单直观的方式创建 JavaScript 库和 UI 组件库,并享受 [Rspack](https://rspack.rs/zh/) 和 [Rsbuild](https://rsbuild.rs/zh/) 带来的极致开发体验。
diff --git a/website/docs/zh/blog/introducing-rslib.mdx b/website/docs/zh/blog/introducing-rslib.mdx
index 32a9220ad..e984c17d6 100644
--- a/website/docs/zh/blog/introducing-rslib.mdx
+++ b/website/docs/zh/blog/introducing-rslib.mdx
@@ -9,9 +9,9 @@ import { ImageAlt } from '../../../theme/components/ImageAlt';
# Rspack 生态升级!全新库开发工具 Rslib 发布
-
+
-我们很高兴地向大家介绍 Rslib —— **一款基于 Rspack 的库开发工具**。Rslib 由字节跳动 Web Infra 团队开发,能够帮助开发者以简单直观的方式创建 JavaScript 库和 UI 组件库,并享受 [Rspack](https://rspack.dev/zh/) 和 [Rsbuild](https://rsbuild.dev/zh/) 带来的极致开发体验。
+我们很高兴地向大家介绍 Rslib —— **一款基于 Rspack 的库开发工具**。Rslib 由字节跳动 Web Infra 团队开发,能够帮助开发者以简单直观的方式创建 JavaScript 库和 UI 组件库,并享受 [Rspack](https://rspack.rs/zh/) 和 [Rsbuild](https://rsbuild.rs/zh/) 带来的极致开发体验。
> 仓库地址:https://github.com/web-infra-dev/rslib
@@ -35,12 +35,12 @@ import { ImageAlt } from '../../../theme/components/ImageAlt';
- **生态共享:** 库构建与应用构建配置统一,复用 Rspack 繁荣社区,推动统一工具链生态发展。
- **性能优先:** 底层构建器基于 Rust 实现,具有良好的构建性能,提升开发者体验。
-为此,我们创建了 Rslib。**它基于 [Rsbuild](https://rsbuild.dev/zh/) 精心设计的配置和插件,使库开发者得以复用 webpack 和 Rspack 繁荣的知识和生态系统,为开发者提供了完备的库开发能力。**
+为此,我们创建了 Rslib。**它基于 [Rsbuild](https://rsbuild.rs/zh/) 精心设计的配置和插件,使库开发者得以复用 webpack 和 Rspack 繁荣的知识和生态系统,为开发者提供了完备的库开发能力。**
我们希望 Rslib 能为库开发者提供更强大的能力,并成为 Rspack 生态中的重要组成部分,持续推动基于 Rspack 的统一工具链的发展。
一个配置文件中包含多种格式
使用 publint 检查 package.json 的正确性
- > 更多插件的信息请参考 [Rsbuild 插件总览](https://rsbuild.dev/zh/plugins/list/)。
+ > 更多插件的信息请参考 [Rsbuild 插件总览](https://rsbuild.rs/zh/plugins/list/)。
## 当前状态及版本演进
diff --git a/website/docs/zh/config/lib/auto-extension.mdx b/website/docs/zh/config/lib/auto-extension.mdx
index 3c56baa3f..d88e01924 100644
--- a/website/docs/zh/config/lib/auto-extension.mdx
+++ b/website/docs/zh/config/lib/auto-extension.mdx
@@ -17,7 +17,7 @@
## 自定义扩展名
-你可以将 `autoExtension` 设置为 `false`,并使用 [output.filename](https://rsbuild.dev/zh/config/output/filename) 来自定义 JavaScript 输出文件。
+你可以将 `autoExtension` 设置为 `false`,并使用 [output.filename](https://rsbuild.rs/zh/config/output/filename) 来自定义 JavaScript 输出文件。
```ts title="rslib.config.ts"
export default defineConfig({
diff --git a/website/docs/zh/config/lib/banner.mdx b/website/docs/zh/config/lib/banner.mdx
index e4c36dfb8..2da1cd2ba 100644
--- a/website/docs/zh/config/lib/banner.mdx
+++ b/website/docs/zh/config/lib/banner.mdx
@@ -43,14 +43,14 @@ type Banner = {
## 注意事项
-JavaScript 和 CSS 文件中的 banner 内容是基于 Rspack 的 [BannerPlugin](https://rspack.dev/zh/plugins/webpack/banner-plugin) 实现的。你需要注意以下几点:
+JavaScript 和 CSS 文件中的 banner 内容是基于 Rspack 的 [BannerPlugin](https://rspack.rs/zh/plugins/webpack/banner-plugin) 实现的。你需要注意以下几点:
- 默认启用了 `raw: true`,所以 banner 内容会作为原始字符串注入,而不是包裹在注释中。因此如果你想注入注释,需要自己添加 `/*` 和 `*/` 或其他注释语法。
- `stage` 选项被设置在 JavaScript 和 CSS 文件优化之后的阶段,从而防止 banner 内容被优化掉。
## 自定义 Banner 内容
-如果上述默认设置无法满足你的需求,你可以通过 `tools.rspack.plugins` 自定义添加一个带有相应选项的 [BannerPlugin](https://rspack.dev/plugins/webpack/banner-plugin) 实例。
+如果上述默认设置无法满足你的需求,你可以通过 `tools.rspack.plugins` 自定义添加一个带有相应选项的 [BannerPlugin](https://rspack.rs/plugins/webpack/banner-plugin) 实例。
```ts title="rslib.config.ts"
export default {
diff --git a/website/docs/zh/config/lib/bundle.mdx b/website/docs/zh/config/lib/bundle.mdx
index 21f678bf3..fe39ab3a6 100644
--- a/website/docs/zh/config/lib/bundle.mdx
+++ b/website/docs/zh/config/lib/bundle.mdx
@@ -11,7 +11,7 @@
### bundle: true
-当 `bundle` 设置为 `true` 时,entry 需要设置为入口文件。Bundle 模式下的默认入口为 `src/index.(ts|js|tsx|jsx|mjs|cjs)`。你需要确保入口文件存在,或通过 [source.entry](https://rsbuild.dev/zh/config/source/entry) 配置自定义入口。
+当 `bundle` 设置为 `true` 时,entry 需要设置为入口文件。Bundle 模式下的默认入口为 `src/index.(ts|js|tsx|jsx|mjs|cjs)`。你需要确保入口文件存在,或通过 [source.entry](https://rsbuild.rs/zh/config/source/entry) 配置自定义入口。
**例子:**
diff --git a/website/docs/zh/config/lib/footer.mdx b/website/docs/zh/config/lib/footer.mdx
index 09ff656da..8aeaf144e 100644
--- a/website/docs/zh/config/lib/footer.mdx
+++ b/website/docs/zh/config/lib/footer.mdx
@@ -43,14 +43,14 @@ type Footer = {
## 注意事项
-JavaScript 和 CSS 文件中的 footer 内容是基于 Rspack 的 [BannerPlugin](https://rspack.dev/plugins/webpack/banner-plugin) 实现的。你需要注意以下几点:
+JavaScript 和 CSS 文件中的 footer 内容是基于 Rspack 的 [BannerPlugin](https://rspack.rs/plugins/webpack/banner-plugin) 实现的。你需要注意以下几点:
- 默认启用了 `raw: true`,所以 footer 内容会作为原始字符串注入,而不是包裹在注释中。因此如果你想注入注释,需要自行添加 `/*` 和 `*/` 或其他注释语法。
- `stage` 选项被设置在 JavaScript 和 CSS 文件优化之后的阶段,从而防止 footer 内容被优化掉。
## 自定义 Footer 内容
-如果以上默认设置无法满足你的需求,你可以通过 `tools.rspack.plugins` 自定义添加带有相应选项的 [BannerPlugin](https://rspack.dev/plugins/webpack/banner-plugin) 实例。
+如果以上默认设置无法满足你的需求,你可以通过 `tools.rspack.plugins` 自定义添加带有相应选项的 [BannerPlugin](https://rspack.rs/plugins/webpack/banner-plugin) 实例。
```ts title="rslib.config.ts"
export default {
diff --git a/website/docs/zh/config/lib/format.mdx b/website/docs/zh/config/lib/format.mdx
index f882901e2..ff1f6c3b4 100644
--- a/website/docs/zh/config/lib/format.mdx
+++ b/website/docs/zh/config/lib/format.mdx
@@ -5,12 +5,12 @@
指定生成的 JavaScript 产物的输出格式。
-在不同的产物格式下,Rslib 默认使用的 Rspack 的 [output.library.type](https://rspack.dev/zh/config/output#outputlibrarytype) 值如下:
+在不同的产物格式下,Rslib 默认使用的 Rspack 的 [output.library.type](https://rspack.rs/zh/config/output#outputlibrarytype) 值如下:
-- `esm`:[modern-module](https://rspack.dev/zh/config/output#type-modern-module)
-- `cjs`:[commonjs-static](https://rspack.dev/zh/config/output#type-commonjs-static)
-- `umd`:[umd](https://rspack.dev/zh/config/output#type-umd)
-- `iife`:开启了 [output.iife](https://rspack.dev/zh/config/output#outputiife) 的 [modern-module](https://rspack.dev/zh/config/output#type-modern-module)
+- `esm`:[modern-module](https://rspack.rs/zh/config/output#type-modern-module)
+- `cjs`:[commonjs-static](https://rspack.rs/zh/config/output#type-commonjs-static)
+- `umd`:[umd](https://rspack.rs/zh/config/output#type-umd)
+- `iife`:开启了 [output.iife](https://rspack.rs/zh/config/output#outputiife) 的 [modern-module](https://rspack.rs/zh/config/output#type-modern-module)
更多详情请参考 [输出格式](/guide/basic/output-format) 和 [模块联邦](/guide/advanced/module-federation)。
diff --git a/website/docs/zh/config/lib/id.mdx b/website/docs/zh/config/lib/id.mdx
index e8c3125a1..4c434cf60 100644
--- a/website/docs/zh/config/lib/id.mdx
+++ b/website/docs/zh/config/lib/id.mdx
@@ -7,7 +7,7 @@
:::tip
-Rslib 在底层使用了 Rsbuild 的 [environments](https://rsbuild.dev/guide/advanced/environments) 特性来在单个项目中构建多个库。`lib.id` 将被用作生成的 Rsbuild environment 的键名。
+Rslib 在底层使用了 Rsbuild 的 [environments](https://rsbuild.rs/guide/advanced/environments) 特性来在单个项目中构建多个库。`lib.id` 将被用作生成的 Rsbuild environment 的键名。
:::
diff --git a/website/docs/zh/config/rsbuild/output.mdx b/website/docs/zh/config/rsbuild/output.mdx
index 245687de0..d30578fb0 100644
--- a/website/docs/zh/config/rsbuild/output.mdx
+++ b/website/docs/zh/config/rsbuild/output.mdx
@@ -13,7 +13,7 @@ import { RsbuildDocBadge } from '@components/RsbuildDocBadge';
- 当 `format` 为 `cjs` 或 `esm` 时,默认值为 `"auto"`。
- 当 `format` 为 `mf` 或 `umd` 时,默认值为 `"/"`。
-当 `output.assetPrefix` 设置为 `"auto"` 时,Rslib 会自动将 [importMode](https://rspack.dev/zh/config/module#modulegeneratorassetimportmode) 设置为 `"preserve"`,以保留 JavaScript 文件中引用静态资源的 `import` 或 `require` 语句。同时,CSS 文件中的静态资源会保留相对引用路径,详情可以查看 [引用静态资源](/guide/advanced/static-assets)。
+当 `output.assetPrefix` 设置为 `"auto"` 时,Rslib 会自动将 [importMode](https://rspack.rs/zh/config/module#modulegeneratorassetimportmode) 设置为 `"preserve"`,以保留 JavaScript 文件中引用静态资源的 `import` 或 `require` 语句。同时,CSS 文件中的静态资源会保留相对引用路径,详情可以查看 [引用静态资源](/guide/advanced/static-assets)。
当 `output.assetPrefix` 设置为具体的路径时,JavaScript 文件中引用静态资源的 `import` 或 `require` 语句会被替换为包含该前缀的 URL。同时,CSS 文件中的静态资源会被直接替换为带有该前缀的路径。
@@ -27,7 +27,7 @@ import { RsbuildDocBadge } from '@components/RsbuildDocBadge';
## output.copy
-将指定的文件或目录拷贝到构建输出目录中,基于 [rspack.CopyRspackPlugin](https://rspack.dev/zh/plugins/rspack/copy-rspack-plugin) 实现。
+将指定的文件或目录拷贝到构建输出目录中,基于 [rspack.CopyRspackPlugin](https://rspack.rs/zh/plugins/rspack/copy-rspack-plugin) 实现。
## output.cssModules
@@ -115,7 +115,7 @@ Rslib 默认会根据 [format](/config/lib/format) 设置 `output.filename.js`
## output.manifest
-是否生成 manifest 文件,该文件包含所有构建产物的信息、以及[入口模块](https://rsbuild.dev/zh/config/source/entry)与构建产物间的映射关系。
+是否生成 manifest 文件,该文件包含所有构建产物的信息、以及[入口模块](https://rsbuild.rs/zh/config/source/entry)与构建产物间的映射关系。
## output.minify
diff --git a/website/docs/zh/config/rsbuild/plugins.mdx b/website/docs/zh/config/rsbuild/plugins.mdx
index f16833437..5e98dbca4 100644
--- a/website/docs/zh/config/rsbuild/plugins.mdx
+++ b/website/docs/zh/config/rsbuild/plugins.mdx
@@ -14,7 +14,7 @@ Rslib 与 Rsbuild 共享同一套插件系统,因此你可以在 Rslib 中使
## 使用插件
-你可以在 `rslib.config.*` 中通过 `plugins` 选项来注册 Rsbuild 插件,详见 [Rsbuild - plugins](https://rsbuild.dev/zh/config/plugins)。
+你可以在 `rslib.config.*` 中通过 `plugins` 选项来注册 Rsbuild 插件,详见 [Rsbuild - plugins](https://rsbuild.rs/zh/config/plugins)。
```ts title="rslib.config.ts"
import { defineConfig } from '@rslib/core';
@@ -33,8 +33,8 @@ export default defineConfig({
适用于 React 的插件有:
-- [React 插件](https://rsbuild.dev/zh/plugins/list/plugin-react):提供对 React 的支持。
-- [SVGR 插件](https://rsbuild.dev/zh/plugins/list/plugin-svgr):支持将 SVG 图片转换为一个 React 组件使用。
+- [React 插件](https://rsbuild.rs/zh/plugins/list/plugin-react):提供对 React 的支持。
+- [SVGR 插件](https://rsbuild.rs/zh/plugins/list/plugin-svgr):支持将 SVG 图片转换为一个 React 组件使用。
- [Styled Components 插件](https://github.com/rspack-contrib/rsbuild-plugin-styled-components):提供对 styled-components 的编译时支持。
### Vue
@@ -42,7 +42,7 @@ export default defineConfig({
适用于 Vue 的插件有:
- [Vue 插件](https://github.com/rspack-contrib/rsbuild-plugin-unplugin-vue):基于 [unplugin-vue](https://github.com/unplugin/unplugin-vue) 实现的为 Vue 3 SFC(单文件组件)提供支持的插件。
-- [Vue 插件](https://rsbuild.dev/zh/plugins/list/plugin-vue):基于 [vue-loader](https://github.com/vuejs/vue-loader) 实现的为 Vue 3 SFC(单文件组件)提供支持的插件(推荐使用基于 [unplugin-vue](https://github.com/unplugin/unplugin-vue) 的实现,vue-loader 已不再维护)。
+- [Vue 插件](https://rsbuild.rs/zh/plugins/list/plugin-vue):基于 [vue-loader](https://github.com/vuejs/vue-loader) 实现的为 Vue 3 SFC(单文件组件)提供支持的插件(推荐使用基于 [unplugin-vue](https://github.com/unplugin/unplugin-vue) 的实现,vue-loader 已不再维护)。
- [Vue JSX 插件](https://github.com/rspack-contrib/rsbuild-plugin-vue-jsx):提供对 Vue 3 JSX / TSX 语法的支持。
- [Vue 2 插件](https://github.com/rspack-contrib/rsbuild-plugin-vue2):提供对 Vue 2 SFC(单文件组件)的支持。
- [Vue 2 JSX 插件](https://github.com/rspack-contrib/rsbuild-plugin-vue2-jsx):提供对 Vue 2 JSX / TSX 语法的支持。
@@ -51,28 +51,28 @@ export default defineConfig({
适用于 Preact 的插件有:
-- [Preact 插件](https://rsbuild.dev/zh/plugins/list/plugin-preact):提供对 Preact 的支持。
+- [Preact 插件](https://rsbuild.rs/zh/plugins/list/plugin-preact):提供对 Preact 的支持。
### Svelte
适用于 Svelte 的插件有:
-- [Svelte 插件](https://rsbuild.dev/zh/plugins/list/plugin-svelte):提供对 Svelte 组件(`.svelte` 文件)的支持。
+- [Svelte 插件](https://rsbuild.rs/zh/plugins/list/plugin-svelte):提供对 Svelte 组件(`.svelte` 文件)的支持。
### Solid
适用于 Solid 的插件有:
-- [Solid 插件](https://rsbuild.dev/zh/plugins/list/plugin-solid):提供对 Solid 的支持。
+- [Solid 插件](https://rsbuild.rs/zh/plugins/list/plugin-solid):提供对 Solid 的支持。
### Common
以下是与框架无关的通用插件:
-- [Babel 插件](https://rsbuild.dev/zh/plugins/list/plugin-babel):提供对 Babel 转译能力的支持。
-- [Sass 插件](https://rsbuild.dev/zh/plugins/list/plugin-sass):使用 Sass 作为 CSS 预处理器。
-- [Less 插件](https://rsbuild.dev/zh/plugins/list/plugin-less):使用 Less 作为 CSS 预处理器。
-- [Stylus 插件](https://rsbuild.dev/zh/plugins/list/plugin-stylus):使用 Stylus 作为 CSS 预处理器。
+- [Babel 插件](https://rsbuild.rs/zh/plugins/list/plugin-babel):提供对 Babel 转译能力的支持。
+- [Sass 插件](https://rsbuild.rs/zh/plugins/list/plugin-sass):使用 Sass 作为 CSS 预处理器。
+- [Less 插件](https://rsbuild.rs/zh/plugins/list/plugin-less):使用 Less 作为 CSS 预处理器。
+- [Stylus 插件](https://rsbuild.rs/zh/plugins/list/plugin-stylus):使用 Stylus 作为 CSS 预处理器。
- [ESLint 插件](https://github.com/rspack-contrib/rsbuild-plugin-eslint):用于在编译过程中运行 ESLint 检查。
- [publint 插件](https://github.com/rspack-contrib/rsbuild-plugin-publint):在构建后运行 `publint` 来检查 npm 包。
- [Type Check 插件](https://github.com/rspack-contrib/rsbuild-plugin-type-check):用于在单独的进程中运行 TypeScript 类型检查。
diff --git a/website/docs/zh/config/rsbuild/resolve.mdx b/website/docs/zh/config/rsbuild/resolve.mdx
index 71dbc26c1..e24f3563e 100644
--- a/website/docs/zh/config/rsbuild/resolve.mdx
+++ b/website/docs/zh/config/rsbuild/resolve.mdx
@@ -10,7 +10,7 @@ import { RsbuildDocBadge } from '@components/RsbuildDocBadge';
## resolve.alias
-设置模块路径的别名,用于简化导入路径或重定向模块引用,类似于 Rspack 的 [resolve.alias](https://rspack.dev/zh/config/resolve#resolvealias) 配置。
+设置模块路径的别名,用于简化导入路径或重定向模块引用,类似于 Rspack 的 [resolve.alias](https://rspack.rs/zh/config/resolve#resolvealias) 配置。
对于 TypeScript 项目,你只需要在 `tsconfig.json` 中配置 [compilerOptions.paths](https://www.typescriptlang.org/tsconfig/#paths) 即可,Rslib 会自动识别它,不需要额外配置 `resolve.alias` 字段。
diff --git a/website/docs/zh/config/rsbuild/source.mdx b/website/docs/zh/config/rsbuild/source.mdx
index f3e1eedf4..3c3e0302e 100644
--- a/website/docs/zh/config/rsbuild/source.mdx
+++ b/website/docs/zh/config/rsbuild/source.mdx
@@ -47,7 +47,7 @@ const defaultEntry = {
## source.exclude
-排除不需要被 [SWC](https://rsbuild.dev/zh/guide/configuration/swc) 转译的 JavaScript 或 TypeScript 文件。
+排除不需要被 [SWC](https://rsbuild.rs/zh/guide/configuration/swc) 转译的 JavaScript 或 TypeScript 文件。
::: note
@@ -55,7 +55,7 @@ const defaultEntry = {
如果你希望某些文件不被打包到产物中,可以使用以下方法:
-- **bundle 模式**:使用 Rspack 的 [IgnorePlugin](https://rspack.dev/zh/plugins/webpack/ignore-plugin)。
+- **bundle 模式**:使用 Rspack 的 [IgnorePlugin](https://rspack.rs/zh/plugins/webpack/ignore-plugin)。
- **bundleless 模式**:使用 `source.entry` 配置相应的 glob 表达式,参考 [设置入口](/config/lib/bundle#bundle-false)。
:::
diff --git a/website/docs/zh/config/rsbuild/tools.mdx b/website/docs/zh/config/rsbuild/tools.mdx
index 9832fc9d2..07e638f49 100644
--- a/website/docs/zh/config/rsbuild/tools.mdx
+++ b/website/docs/zh/config/rsbuild/tools.mdx
@@ -14,7 +14,7 @@ Rsbuild 默认使用 [css-loader](https://github.com/webpack-contrib/css-loader)
## tools.lightningcssLoader
-通过 `tools.lightningcssLoader` 可以设置 [builtin:lightningcss-loader](https://rspack.dev/zh/guide/features/builtin-lightningcss-loader) 的选项。
+通过 `tools.lightningcssLoader` 可以设置 [builtin:lightningcss-loader](https://rspack.rs/zh/guide/features/builtin-lightningcss-loader) 的选项。
## tools.postcss
@@ -22,7 +22,7 @@ Rsbuild 默认集成 PostCSS,你可以通过 `tools.postcss` 对 [postcss-load
## tools.rspack
-`tools.rspack` 选项用于修改 [Rspack](https://rspack.dev/zh/config/index) 的配置项。
+`tools.rspack` 选项用于修改 [Rspack](https://rspack.rs/zh/config/index) 的配置项。
## tools.styleLoader
@@ -30,4 +30,4 @@ Rsbuild 默认集成 PostCSS,你可以通过 `tools.postcss` 对 [postcss-load
## tools.swc
-通过 `tools.swc` 可以设置 [builtin:swc-loader](https://rspack.dev/zh/guide/features/builtin-swc-loader) 的选项。
+通过 `tools.swc` 可以设置 [builtin:swc-loader](https://rspack.rs/zh/guide/features/builtin-swc-loader) 的选项。
diff --git a/website/docs/zh/guide/advanced/output-compatibility.mdx b/website/docs/zh/guide/advanced/output-compatibility.mdx
index 66ec1b36d..129c15606 100644
--- a/website/docs/zh/guide/advanced/output-compatibility.mdx
+++ b/website/docs/zh/guide/advanced/output-compatibility.mdx
@@ -15,7 +15,7 @@ Rslib 还支持使用 [.browserslistrc](https://github.com/browserslist/browsers
## Polyfill
-在处理兼容性问题之前,建议了解以下背景知识,以便更好地处理相关问题。请查看有关 [语法降级和 API 降级](https://rsbuild.dev/zh/guide/advanced/browser-compatibility#%E8%AF%AD%E6%B3%95%E9%99%8D%E7%BA%A7%E5%92%8C-api-%E9%99%8D%E7%BA%A7) 的背景知识。
+在处理兼容性问题之前,建议了解以下背景知识,以便更好地处理相关问题。请查看有关 [语法降级和 API 降级](https://rsbuild.rs/zh/guide/advanced/browser-compatibility#%E8%AF%AD%E6%B3%95%E9%99%8D%E7%BA%A7%E5%92%8C-api-%E9%99%8D%E7%BA%A7) 的背景知识。
### 浏览器
@@ -25,7 +25,7 @@ Rslib 还支持使用 [.browserslistrc](https://github.com/browserslist/browsers
#### 设置
-polyfill 依赖于 Babel 注入 polyfill 代码,因此你需要安装 [Rsbuild Babel 插件](https://rsbuild.dev/zh/plugins/list/plugin-babel) 和 [babel-plugin-polyfill-corejs3](https://www.npmjs.com/package/babel-plugin-polyfill-corejs3) 来注入 polyfill 代码。
+polyfill 依赖于 Babel 注入 polyfill 代码,因此你需要安装 [Rsbuild Babel 插件](https://rsbuild.rs/zh/plugins/list/plugin-babel) 和 [babel-plugin-polyfill-corejs3](https://www.npmjs.com/package/babel-plugin-polyfill-corejs3) 来注入 polyfill 代码。
diff --git a/website/docs/zh/guide/advanced/static-assets.mdx b/website/docs/zh/guide/advanced/static-assets.mdx
index 16ec47c61..32a6372ab 100644
--- a/website/docs/zh/guide/advanced/static-assets.mdx
+++ b/website/docs/zh/guide/advanced/static-assets.mdx
@@ -53,7 +53,7 @@ console.log(logo);
-
+
@@ -72,7 +72,7 @@ console.log(logo_namespaceObject);
-
+
@@ -98,7 +98,7 @@ export { logo_namespaceObject as default };
-
+
@@ -139,7 +139,7 @@ export { logo_namespaceObject as default };
- 每个框架的依赖各不相同,可查阅 [Storybook Rsbuild 文档](https://storybook.rsbuild.dev/guide/framework.html) 了解详细信息。在这个 React 示例中,我们将安装 [storybook-react-rsbuild](https://www.npmjs.com/package/storybook-react-rsbuild) 作为框架集成。
+ 每个框架的依赖各不相同,可查阅 [Storybook Rsbuild 文档](https://storybook.rsbuild.rs/guide/framework.html) 了解详细信息。在这个 React 示例中,我们将安装 [storybook-react-rsbuild](https://www.npmjs.com/package/storybook-react-rsbuild) 作为框架集成。
@@ -95,7 +95,7 @@ npx storybook dev // 开发模式
npx storybook build // 构建静态文件
```
-查看 [Storybook Rsbuild 文档](https://storybook.rsbuild.dev/) 和 [Storybook 文档](https://storybook.js.org/docs/react/get-started/introduction) 以了解更多信息。
+查看 [Storybook Rsbuild 文档](https://storybook.rsbuild.rs/) 和 [Storybook 文档](https://storybook.js.org/docs/react/get-started/introduction) 以了解更多信息。
## 示例
diff --git a/website/docs/zh/guide/advanced/svgr-files.mdx b/website/docs/zh/guide/advanced/svgr-files.mdx
index 50dac8591..d09aabf5c 100644
--- a/website/docs/zh/guide/advanced/svgr-files.mdx
+++ b/website/docs/zh/guide/advanced/svgr-files.mdx
@@ -2,7 +2,7 @@
默认情况下,Rslib 会将 SVG 图片当作静态资源处理。
-通过添加 [@rsbuild/plugin-svgr](https://rsbuild.dev/zh/plugins/list/plugin-svgr) 插件,Rslib 支持调用 [SVGR](https://react-svgr.com/),将 SVG 图片转换为一个 React 组件使用。
+通过添加 [@rsbuild/plugin-svgr](https://rsbuild.rs/zh/plugins/list/plugin-svgr) 插件,Rslib 支持调用 [SVGR](https://react-svgr.com/),将 SVG 图片转换为一个 React 组件使用。
## 快速开始
@@ -30,7 +30,7 @@ export default {
### Bundle 模式
-在 bundle 模式下,Rslib 支持 [@rsbuild/plugin-svgr](https://rsbuild.dev/zh/plugins/list/plugin-svgr) 下的所有用法,唯一的区别是当以 URL 形式使用 SVG 文件时,Rslib 会按照 [引用静态资源](/guide/advanced/static-assets) 在产物中对应保留静态资源的 `import` 语句。
+在 bundle 模式下,Rslib 支持 [@rsbuild/plugin-svgr](https://rsbuild.rs/zh/plugins/list/plugin-svgr) 下的所有用法,唯一的区别是当以 URL 形式使用 SVG 文件时,Rslib 会按照 [引用静态资源](/guide/advanced/static-assets) 在产物中对应保留静态资源的 `import` 语句。
下面是一个使用示例:
@@ -50,8 +50,8 @@ console.log(logoURL);
`@rsbuild/plugin-svgr` 也支持默认导入和混合导入等用法:
-- 通过 [svgrOptions.exportType](https://rsbuild.dev/zh/plugins/list/plugin-svgr#svgroptionsexporttype) 设置为 `'default'` 来启用默认导入。
-- 通过 [mixedImport](https://rsbuild.dev/zh/plugins/list/plugin-svgr#mixedimport) 选项来启用混合导入,从而同时使用默认导入和具名导入。
+- 通过 [svgrOptions.exportType](https://rsbuild.rs/zh/plugins/list/plugin-svgr#svgroptionsexporttype) 设置为 `'default'` 来启用默认导入。
+- 通过 [mixedImport](https://rsbuild.rs/zh/plugins/list/plugin-svgr#mixedimport) 选项来启用混合导入,从而同时使用默认导入和具名导入。
### Bundleless 模式
@@ -59,7 +59,7 @@ console.log(logoURL);
#### 具名导入
-`@rsbuild/plugin-svgr` 支持具名导入 `ReactComponent` 来使用 SVGR,你需要设置 [svgrOptions.exportType](https://rsbuild.dev/zh/plugins/list/plugin-svgr#svgroptionsexporttype) 为 `'named'`:
+`@rsbuild/plugin-svgr` 支持具名导入 `ReactComponent` 来使用 SVGR,你需要设置 [svgrOptions.exportType](https://rsbuild.rs/zh/plugins/list/plugin-svgr#svgroptionsexporttype) 为 `'named'`:
```js
pluginSvgr({
@@ -77,8 +77,8 @@ export const App = () => ;
所有的 `.svg` 文件都会被转换成 React 组件,此时你可以:
-- 通过设置 [exclude](https://rsbuild.dev/zh/plugins/list/plugin-svgr#exclude) 来排除不需要转换的文件。
-- 通过 [svgrOptions.exportType](https://rsbuild.dev/zh/plugins/list/plugin-svgr#svgroptionsexporttype) 设置为 `'default'` 来修改为默认导出。
+- 通过设置 [exclude](https://rsbuild.rs/zh/plugins/list/plugin-svgr#exclude) 来排除不需要转换的文件。
+- 通过 [svgrOptions.exportType](https://rsbuild.rs/zh/plugins/list/plugin-svgr#svgroptionsexporttype) 设置为 `'default'` 来修改为默认导出。
#### 混合导入
@@ -102,4 +102,4 @@ console.log(logoUrl); // -> string
console.log(Logo); // -> React component
```
-更多信息可以参考 [mixedImport](https://rsbuild.dev/zh/plugins/list/plugin-svgr#mixedimport) 选项。
+更多信息可以参考 [mixedImport](https://rsbuild.rs/zh/plugins/list/plugin-svgr#mixedimport) 选项。
diff --git a/website/docs/zh/guide/basic/cli.mdx b/website/docs/zh/guide/basic/cli.mdx
index af94f120b..68505df85 100644
--- a/website/docs/zh/guide/basic/cli.mdx
+++ b/website/docs/zh/guide/basic/cli.mdx
@@ -26,14 +26,14 @@ Commands:
Rslib CLI 提供了一些公共选项,可以用于所有命令:
-| 选项 | 描述 |
-| ----------------------- | -------------------------------------------------------------------------------------------------------------------------- |
-| `-c, --config ` | 指定配置文件路径,可以为相对路径或绝对路径,详见 [指定配置文件](/guide/basic/configure-rslib#指定配置文件) |
-| `--env-dir ` | 指定目录来加载 `.env` 文件,详见 [Rsbuild - Env 目录](https://rsbuild.dev/zh/guide/advanced/env-vars#env-目录) |
-| `--env-mode ` | 指定 env 模式来加载 `.env.[mode]` 文件,详见 [Rsbuild - Env 模式](https://rsbuild.dev/zh/guide/advanced/env-vars#env-模式) |
-| `-h, --help` | 显示命令帮助 |
-| `--lib ` | 指定运行命令的库(可重复,例如:`--lib esm --lib cjs`),查看 [lib.id](/config/lib/id) 了解如何获取或设置库的 ID |
-| `-r, --root ` | 指定项目根目录,可以是绝对路径或者相对于 cwd 的路径 |
+| 选项 | 描述 |
+| ----------------------- | ------------------------------------------------------------------------------------------------------------------------- |
+| `-c, --config ` | 指定配置文件路径,可以为相对路径或绝对路径,详见 [指定配置文件](/guide/basic/configure-rslib#指定配置文件) |
+| `--env-dir ` | 指定目录来加载 `.env` 文件,详见 [Rsbuild - Env 目录](https://rsbuild.rs/zh/guide/advanced/env-vars#env-目录) |
+| `--env-mode ` | 指定 env 模式来加载 `.env.[mode]` 文件,详见 [Rsbuild - Env 模式](https://rsbuild.rs/zh/guide/advanced/env-vars#env-模式) |
+| `-h, --help` | 显示命令帮助 |
+| `--lib ` | 指定运行命令的库(可重复,例如:`--lib esm --lib cjs`),查看 [lib.id](/config/lib/id) 了解如何获取或设置库的 ID |
+| `-r, --root ` | 指定项目根目录,可以是绝对路径或者相对于 cwd 的路径 |
## rslib build
@@ -51,7 +51,7 @@ Options:
Rslib 支持在构建过程中向代码中注入环境变量或表达式,这对于区分运行环境、替换常量值等场景很有帮助。
-你可以查看 [Rsbuild - 环境变量](https://rsbuild.dev/zh/guide/advanced/env-vars) 了解更多详细信息。
+你可以查看 [Rsbuild - 环境变量](https://rsbuild.rs/zh/guide/advanced/env-vars) 了解更多详细信息。
::: note
diff --git a/website/docs/zh/guide/basic/configure-rslib.mdx b/website/docs/zh/guide/basic/configure-rslib.mdx
index 5c38d3b43..96159eafb 100644
--- a/website/docs/zh/guide/basic/configure-rslib.mdx
+++ b/website/docs/zh/guide/basic/configure-rslib.mdx
@@ -62,7 +62,7 @@ export default {
};
```
-Rslib 会在内部生成 Rsbuild 的 [environments](https://rsbuild.dev/zh/config/environments) 配置,请参考 [调试配置](#调试配置) 来查看最终生成的配置。
+Rslib 会在内部生成 Rsbuild 的 [environments](https://rsbuild.rs/zh/config/environments) 配置,请参考 [调试配置](#调试配置) 来查看最终生成的配置。
你也可以在 [配置概览](/config/) 页面查看所有配置的详细介绍。
@@ -79,7 +79,7 @@ Rslib 会在内部生成 Rsbuild 的 [environments](https://rsbuild.dev/zh/confi
我们推荐使用 `.mjs` 或 `.ts` 格式的配置文件,并从 `@rslib/core` 中导入 `defineConfig` 工具函数, 它提供了友好的 TypeScript 类型推导和自动补全,可以帮助你避免配置中的错误。
-比如在 `rslib.config.ts` 中,你可以定义 Rslib 的 [syntax](/config/lib/syntax) 配置和 Rsbuild 的 [output.target](https://rsbuild.dev/config/output/target#outputtarget) 配置:
+比如在 `rslib.config.ts` 中,你可以定义 Rslib 的 [syntax](/config/lib/syntax) 配置和 Rsbuild 的 [output.target](https://rsbuild.rs/config/output/target#outputtarget) 配置:
```ts title="rslib.config.ts"
import { defineConfig } from '@rslib/core';
@@ -154,13 +154,13 @@ export default defineConfig({
Rslib 允许你使用绝大部分的 Rsbuild 配置。目前不支持使用 `environments` 配置,因为该字段会在 Rslib 内部生成。
- 参考 [Rsbuild 配置](/config/rsbuild/) 了解常用的 Rsbuild 配置。
-- 参考 [Rsbuild 文档](https://rsbuild.dev/config/index#config-overview) 了解所有 Rsbuild 配置。
+- 参考 [Rsbuild 文档](https://rsbuild.rs/config/index#config-overview) 了解所有 Rsbuild 配置。
## 配置 Rspack
Rslib 基于 Rsbuild 构建,Rsbuild 支持直接修改 Rspack 配置对象,也支持通过 `rspack-chain` 修改 Rsbuild 内置的 Rspack 配置。这意味着你可以在 Rslib 项目中配置 Rspack 相关配置。
-详情请参考 [配置 Rspack](https://rsbuild.dev/guide/basic/configure-rspack)。
+详情请参考 [配置 Rspack](https://rsbuild.rs/guide/basic/configure-rspack)。
## 调试配置
diff --git a/website/docs/zh/guide/basic/output-format.mdx b/website/docs/zh/guide/basic/output-format.mdx
index 6bfbc73cd..b749129ee 100644
--- a/website/docs/zh/guide/basic/output-format.mdx
+++ b/website/docs/zh/guide/basic/output-format.mdx
@@ -137,7 +137,7 @@ MF 代表 Module Federation。
IIFE 格式代表「立即调用函数表达式」,旨在浏览器中运行。将代码包裹在函数表达式中,可确保代码中的任何变量不会意外与全局作用域中的变量发生冲突。若你的入口点有需要在浏览器中作为全局变量暴露的导出内容,可通过全局名称设置来配置该全局变量的名称。
-在 IIFE 格式下,[output.globalObject](https://rspack.dev/zh/config/output#outputglobalobject) 默认设置为 [globalThis](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis),源码中命中了 [externals](/config/rsbuild/output#outputexternals) 的 `import` 语句将被转换为通过 `globalThis` 上的属性访问,你可以覆盖 [output.globalObject](https://rspack.dev/zh/config/output#outputglobalobject) 为任意值。
+在 IIFE 格式下,[output.globalObject](https://rspack.rs/zh/config/output#outputglobalobject) 默认设置为 [globalThis](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis),源码中命中了 [externals](/config/rsbuild/output#outputexternals) 的 `import` 语句将被转换为通过 `globalThis` 上的属性访问,你可以覆盖 [output.globalObject](https://rspack.rs/zh/config/output#outputglobalobject) 为任意值。
指定 `iife` 格式时源码及对应产物如下:
diff --git a/website/docs/zh/guide/basic/output-structure.mdx b/website/docs/zh/guide/basic/output-structure.mdx
index 084201e0e..86c6f97f8 100644
--- a/website/docs/zh/guide/basic/output-structure.mdx
+++ b/website/docs/zh/guide/basic/output-structure.mdx
@@ -8,7 +8,7 @@
而 bundleless,则是指对每个源文件单独进行编译构建,但是并不将它们打包在一起。每一个产物文件都可以找到与之相对应的源码文件。Bundleless 构建的过程,也可以理解为仅对源文件进行代码转换的过程。
-
+
它们有各自的好处:
diff --git a/website/docs/zh/guide/faq/features.mdx b/website/docs/zh/guide/faq/features.mdx
index 1bc2a7c4a..613a27f09 100644
--- a/website/docs/zh/guide/faq/features.mdx
+++ b/website/docs/zh/guide/faq/features.mdx
@@ -118,7 +118,7 @@ export default {
### 如何在生成产物时保留源码中的 `__webpack_hash__` 等模块变量?
-Rslib 底层使用的 Rspack,在构建时会默认将 `__webpack_hash__`、`__webpack_nonce__`、`__webpack_public_path__` 等 [模块变量](https://rspack.dev/zh/api/runtime-api/module-variables) 转换为包含 `__webpack_require__` 的运行时代码。如果你需要在产物中保留这些模块变量,可以通过配置 [source.define](/config/rsbuild/source#sourcedefine) 来实现,如下所示:
+Rslib 底层使用的 Rspack,在构建时会默认将 `__webpack_hash__`、`__webpack_nonce__`、`__webpack_public_path__` 等 [模块变量](https://rspack.rs/zh/api/runtime-api/module-variables) 转换为包含 `__webpack_require__` 的运行时代码。如果你需要在产物中保留这些模块变量,可以通过配置 [source.define](/config/rsbuild/source#sourcedefine) 来实现,如下所示:
1. 在源码中将需要保留的模块变量替换为一个特征名称,如 `__webpack_hash__` 替换为 `WEBPACK_HASH`,`__webpack_nonce__` 替换为 `WEBPACK_NONCE`,`__webpack_public_path__` 替换为 `WEBPACK_PUBLIC_PATH` 等。
diff --git a/website/docs/zh/guide/solution/index.mdx b/website/docs/zh/guide/solution/index.mdx
index a3e0e7a9b..d9078f116 100644
--- a/website/docs/zh/guide/solution/index.mdx
+++ b/website/docs/zh/guide/solution/index.mdx
@@ -4,7 +4,7 @@
## Browser target
-开发在浏览器中运行的库时,可以将其打包为 [ESM](/guide/basic/output-format#esm--cjs) 和 [CJS](/guide/basic/output-format#esm--cjs) 格式,用于与 app 的打包工具集成。将包 [conditional-exports](https://nodejs.org/api/packages.html#conditional-exports) 配置为 ESM 输出可以更好地进行 treeshaking。此外,你可以创建 [UMD](/guide/basic/output-format#umd) 格式输出以供浏览器直接使用,甚至可以生成 [模块联邦](/guide/advanced/module-federation) 格式以供其他应用程序动态加载。根据目标浏览器支持配置 [Browserslist](https://rsbuild.dev/zh/guide/advanced/browserslist)以确定输出的降级语法,或添加 [polyfill](/guide/advanced/output-compatibility) 用于兼容 API。
+开发在浏览器中运行的库时,可以将其打包为 [ESM](/guide/basic/output-format#esm--cjs) 和 [CJS](/guide/basic/output-format#esm--cjs) 格式,用于与 app 的打包工具集成。将包 [conditional-exports](https://nodejs.org/api/packages.html#conditional-exports) 配置为 ESM 输出可以更好地进行 treeshaking。此外,你可以创建 [UMD](/guide/basic/output-format#umd) 格式输出以供浏览器直接使用,甚至可以生成 [模块联邦](/guide/advanced/module-federation) 格式以供其他应用程序动态加载。根据目标浏览器支持配置 [Browserslist](https://rsbuild.rs/zh/guide/advanced/browserslist)以确定输出的降级语法,或添加 [polyfill](/guide/advanced/output-compatibility) 用于兼容 API。
发布到 npm 时,你可以选择不压缩代码或[压缩代码](/config/rsbuild/output#outputminify),同时提供[sourcemap](/config/rsbuild/output#outputsourcema) 以增强库使用者的调试体验。样式上,可以使用 CSS 或 CSS 预处理器,如 Sass、Less 或 Stylus 等,或使用 PostCSS 用于 CSS 后处理。 Tailwind CSS 等工具也可以帮助你构建样式,也可以使用 CSS Modules。
diff --git a/website/docs/zh/guide/solution/react.mdx b/website/docs/zh/guide/solution/react.mdx
index 6a6de9571..40ab11c22 100644
--- a/website/docs/zh/guide/solution/react.mdx
+++ b/website/docs/zh/guide/solution/react.mdx
@@ -23,7 +23,7 @@ import { PackageManagerTabs } from '@theme';
开发 React 组件,需要在 `rslib.config.ts` 中设置 [target](/config/rsbuild/output#outputtarget) 为 `"web"`。 这一点至关重要,因为 Rslib 默认将 `target` 设置为 `"node"`,这与 Rsbuild 的 target 默认值不同。
-要编译 React(JSX 和 TSX),你需要注册 Rsbuild [React 插件](https://rsbuild.dev/zh/plugins/list/plugin-react)。该插件将自动添加 React 构建所需的配置。
+要编译 React(JSX 和 TSX),你需要注册 Rsbuild [React 插件](https://rsbuild.rs/zh/plugins/list/plugin-react)。该插件将自动添加 React 构建所需的配置。
例如,在 `rslib.config.ts` 中注册:
@@ -52,7 +52,7 @@ React 引入了一个 [新的 JSX transform](https://legacy.reactjs.org/blog/202
默认情况下,Rsbuild 使用新的 JSX 转换,即 `runtime: 'automatic'`。需要 React `16.14.0` 或更高版本。 `peerDependencies` 中应声明 `"react": ">=16.14.0"`。
-要更改 JSX transform,可以传递 [swcReactOptions](https://rsbuild.dev/zh/plugins/list/plugin-react#swcreactoptionsruntime) 给 React plugin. 比如要使用 classic runtime 时:
+要更改 JSX transform,可以传递 [swcReactOptions](https://rsbuild.rs/zh/plugins/list/plugin-react#swcreactoptionsruntime) 给 React plugin. 比如要使用 classic runtime 时:
```ts title="rslib.config.ts"
import { pluginReact } from '@rsbuild/plugin-react';
@@ -113,5 +113,5 @@ export default defineConfig({
## 进一步了解
-- [Rsbuild React Plugin](https://rsbuild.dev/zh/plugins/list/plugin-react#swcreactoptionsruntime)
+- [Rsbuild React Plugin](https://rsbuild.rs/zh/plugins/list/plugin-react#swcreactoptionsruntime)
- [SWC Compilation - jsc.transform.react](https://swc.rs/docs/configuration/compilation#jsctransformreact)
diff --git a/website/docs/zh/guide/start/glossary.mdx b/website/docs/zh/guide/start/glossary.mdx
index c9e1d432b..381e22549 100644
--- a/website/docs/zh/guide/start/glossary.mdx
+++ b/website/docs/zh/guide/start/glossary.mdx
@@ -27,4 +27,4 @@ Bundleless 是指对每个源文件单独进行编译构建,但是并不将它
## 更多
-访问 [Rsbuild - 名词解释](https://rsbuild.dev/zh/guide/start/glossary) 和 [Rspack - 术语表](https://rspack.dev/zh/misc/glossary) 中的更多名词解释。
+访问 [Rsbuild - 名词解释](https://rsbuild.rs/zh/guide/start/glossary) 和 [Rspack - 术语表](https://rspack.rs/zh/misc/glossary) 中的更多名词解释。
diff --git a/website/docs/zh/guide/start/index.mdx b/website/docs/zh/guide/start/index.mdx
index 0c723f46d..66aae34e6 100644
--- a/website/docs/zh/guide/start/index.mdx
+++ b/website/docs/zh/guide/start/index.mdx
@@ -1,6 +1,6 @@
# 介绍
-Rslib 是一个库开发工具,它基于 [Rsbuild](https://rsbuild.dev/zh/) 精心设计的配置和插件,使库开发者得以复用 webpack 和 Rspack 繁荣的知识和生态系统。
+Rslib 是一个库开发工具,它基于 [Rsbuild](https://rsbuild.rs/zh/) 精心设计的配置和插件,使库开发者得以复用 webpack 和 Rspack 繁荣的知识和生态系统。
Rslib 提供了丰富的构建功能,包括:
@@ -26,7 +26,7 @@ Rslib 具备以下特性:
- **易于配置**: Rslib 旨在通过提供开箱即用的构建能力,简化库的开发,使库开发者能够以最少的配置启动库项目。
-- **性能优先**: Rslib 集成了社区中基于 Rust 的高性能工具,包括 [Rspack](https://rspack.dev/zh/)、[SWC](https://swc.rs/) 和 [Lightning CSS](https://lightningcss.dev/),以提供一流的构建速度和开发体验。
+- **性能优先**: Rslib 集成了社区中基于 Rust 的高性能工具,包括 [Rspack](https://rspack.rs/zh/)、[SWC](https://swc.rs/) 和 [Lightning CSS](https://lightningcss.dev/),以提供一流的构建速度和开发体验。
- **插件生态**: Rslib 基于 Rsbuild 轻量级的插件系统和一系列高质量的官方插件。此外,Rsbuild 兼容大多数的 webpack 插件和所有 Rspack 插件,这意味着库开发者可以无缝集成现有的社区或公司内插件到库项目中。
@@ -36,7 +36,7 @@ Rslib 基于 Rsbuild 实现,并完全复用 Rsbuild 的能力和生态系统
下图说明了 Rsbuild 与生态中其他工具之间的关系:
-
+
## 🦀 Rstack
diff --git a/website/docs/zh/shared/components/MF.mdx b/website/docs/zh/shared/components/MF.mdx
index f11370527..8c5c15ad8 100644
--- a/website/docs/zh/shared/components/MF.mdx
+++ b/website/docs/zh/shared/components/MF.mdx
@@ -1,3 +1,3 @@
模块联邦是一种用于 JavaScript 应用程序分解的架构模式(类似于服务器端的微服务),允许你在多个 JavaScript 应用程序(或微前端)之间共享代码和资源。
-请参阅 [模块联邦](https://rsbuild.dev/guide/advanced/module-federation) 以获取更多详细信息。
+请参阅 [模块联邦](https://rsbuild.rs/guide/advanced/module-federation) 以获取更多详细信息。
diff --git a/website/package.json b/website/package.json
index 8501de2dd..bf176909c 100644
--- a/website/package.json
+++ b/website/package.json
@@ -15,7 +15,7 @@
"@rspress/plugin-algolia": "2.0.0-beta.7",
"@rspress/plugin-llms": "2.0.0-beta.7",
"@rspress/plugin-rss": "2.0.0-beta.7",
- "@rstack-dev/doc-ui": "1.10.3",
+ "@rstack-dev/doc-ui": "1.10.5",
"@shikijs/transformers": "^3.4.2",
"@types/node": "^22.15.21",
"@types/react": "^19.1.5",
diff --git a/website/rspress.config.ts b/website/rspress.config.ts
index 0890f006e..d9382f64d 100644
--- a/website/rspress.config.ts
+++ b/website/rspress.config.ts
@@ -52,8 +52,8 @@ export default defineConfig({
title: 'Rslib',
description:
'Rslib is a library development tool that leverages the well-designed configurations and plugins of Rsbuild.',
- icon: 'https://assets.rspack.dev/rslib/rslib-logo-192x192.png',
- logo: 'https://assets.rspack.dev/rslib/rslib-logo-192x192.png',
+ icon: 'https://assets.rspack.rs/rslib/rslib-logo-192x192.png',
+ logo: 'https://assets.rspack.rs/rslib/rslib-logo-192x192.png',
logoText: 'Rslib',
markdown: {
checkDeadLinks: true,
@@ -77,7 +77,7 @@ export default defineConfig({
}
return 'rslib-og-image.png';
};
- return ``;
+ return ``;
},
],
themeConfig: {
diff --git a/website/theme/components/Hero.tsx b/website/theme/components/Hero.tsx
index a47c19ec1..95aede0cd 100644
--- a/website/theme/components/Hero.tsx
+++ b/website/theme/components/Hero.tsx
@@ -17,7 +17,7 @@ export function Hero() {
title="Rslib"
subTitle={t('subtitle')}
description={t('slogan')}
- logoUrl="https://assets.rspack.dev/rslib/rslib-logo.svg"
+ logoUrl="https://assets.rspack.rs/rslib/rslib-logo.svg"
getStartedButtonText={t('quickStart')}
githubURL="https://github.com/web-infra-dev/rslib"
/>
diff --git a/website/theme/components/RsbuildDocBadge.tsx b/website/theme/components/RsbuildDocBadge.tsx
index 252a60910..590afa728 100644
--- a/website/theme/components/RsbuildDocBadge.tsx
+++ b/website/theme/components/RsbuildDocBadge.tsx
@@ -12,7 +12,7 @@ type Props = {
export function RsbuildDocBadge({ path, text, alt }: Props) {
const langPrefix = useLang() === 'en' ? '' : '/zh';
- const href = `https://rsbuild.dev${langPrefix}${path}`;
+ const href = `https://rsbuild.rs${langPrefix}${path}`;
return (
{text}