Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix all broken plugin links #6296

Merged
merged 1 commit into from
Apr 19, 2024
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/cspell.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {
'package.json',
'pnpm-lock.yaml',
'rspack.mp3',
'doc_build',
],
flagWords: banWords,
caseSensitive: true,
Expand Down
10 changes: 5 additions & 5 deletions website/docs/en/blog/announcing-0.4.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ But we suggest you use `builtin:swc-loader` to transform files now. More details

### Migrating builtin options to builtin plugins

In v0.4.0, Rspack deprecated some of the builtin options and migrated them to [internal plugins](/config/plugins.html#internal-plugins).
In v0.4.0, Rspack deprecated some of the builtin options and migrated them to [builtin plugins](/config/plugins).

Currently, Rspack's internal plugins are divided into two categories:

Expand All @@ -301,7 +301,7 @@ module.exports = {
}
```

For `builtins.html`, it can be directly migrated to [HtmlRspackPlugin](/config/plugins.html#htmlrspackplugin):
For `builtins.html`, it can be directly migrated to [HtmlRspackPlugin](/plugins/rspack/html-rspack-plugin):

```diff
+ const rspack = require("@rspack/core")
Expand All @@ -327,9 +327,9 @@ module.exports = {
};
```

For `builtins.copy`, it can be directly migrated to [CopyRspackPlugin](/config/plugins.html#copyrspackplugin).
For `builtins.copy`, it can be directly migrated to [CopyRspackPlugin](/plugins/rspack/copy-rspack-plugin).

For the original `builtins.minifyOptions`, we provide [SwcJsMinimizerRspackPlugin](/config/plugins.html#swcjsminimizerrspackplugin):
For the original `builtins.minifyOptions`, we provide [SwcJsMinimizerRspackPlugin](/plugins/rspack/swc-js-minimizer-rspack-plugin):

```js
const rspack = require('@rspack/core');
Expand All @@ -344,4 +344,4 @@ module.exports = {
};
```

Other builtin options can be directly referred to the rspack [internal plugins](/config/plugins.html#internal-plugins) for migration, or completed according to the CLI prompts after upgrading to v0.4.0.
Other builtin options can be directly referred to the rspack [builtin plugins](/config/plugins) for migration, or completed according to the CLI prompts after upgrading to v0.4.0.
14 changes: 7 additions & 7 deletions website/docs/en/config/builtins.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The built-in functionality provided by _builtins_ may change in the future or be
/>

:::warning
Please migrate to [`BannerPlugin`](/config/plugins.html#bannerplugin).
Please migrate to [`BannerPlugin`](/plugins/webpack/banner-plugin).
:::

- **Type:**
Expand Down Expand Up @@ -244,7 +244,7 @@ module.exports = {
/>

:::warning
Please migrate to [`HtmlRspackPlugin`](/config/plugins.html#htmlrspackplugin).
Please migrate to [`HtmlRspackPlugin`](/plugins/rspack/html-rspack-plugin).
:::

This configuration simplifies creation of HTML files to serve your Rspack bundles.
Expand Down Expand Up @@ -302,7 +302,7 @@ If the configuration options provided by `rspack.HtmlRspackPlugin` cannot meet y
/>

:::warning
Please migrate to [`SwcJsMinimizerRspackPlugin`](/config/plugins.html#swcjsminimizerrspackplugin).
Please migrate to [`SwcJsMinimizerRspackPlugin`](/plugins/rspack/swc-js-minimizer-rspack-plugin).
:::

Set built-in minimizer options.
Expand Down Expand Up @@ -342,7 +342,7 @@ type BuiltinsMinifyOptions = {
/>

:::warning
Please migrate to [`DefinePlugin`](/config/plugins.html#defineplugin).
Please migrate to [`DefinePlugin`](/plugins/webpack/define-plugin).
:::

Replaces variables in your code with other values or expressions at compile time.
Expand Down Expand Up @@ -520,7 +520,7 @@ type BuiltinsCssModules = {
/>

:::warning
Please migrate to [`ProgressPlugin`](/config/plugins.html#progressplugin).
Please migrate to [`ProgressPlugin`](/plugins/webpack/progress-plugin).
:::

This configuration can be used to control progress, `false` means to turn off progress.
Expand Down Expand Up @@ -562,7 +562,7 @@ Whether to enable the development-friendly split chunks algorithm.
/>

:::warning
Please migrate to [`CopyRspackPlugin`](/config/plugins.html#copyrspackplugin).
Please migrate to [`CopyRspackPlugin`](/plugins/rspack/copy-rspack-plugin).
:::

import WebpackLicense from '../../../components/webpack-license';
Expand Down Expand Up @@ -818,7 +818,7 @@ import 'antd/es/button/style';
/>

:::warning
Please migrate to [`ProvidePlugin`](/config/plugins.html#provideplugin).
Please migrate to [`ProvidePlugin`](/plugins/webpack/provide-plugin).
:::

Automatically load modules instead of having to import or require them everywhere.
Expand Down
4 changes: 2 additions & 2 deletions website/docs/en/config/optimization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ If you are encountering performance issue, and you are using `optimization.split
]}
/>

Customize the minimizer. By default, [`rspack.SwcJsMinimizerRspackPlugin`](/config/plugins.html#swcjsminimizerrspackplugin)
and [`rspack.SwcCssMinimizerRspackPlugin`](/config/plugins.html#swccssminimizerrspackplugin) are used.
Customize the minimizer. By default, [`rspack.SwcJsMinimizerRspackPlugin`](/plugins/rspack/swc-js-minimizer-rspack-plugin)
and [`rspack.SwcCssMinimizerRspackPlugin`](/plugins/rspack/swc-css-minimizer-rspack-plugin) are used.
When `optimization.minimizer` is specified, the default minimizers will be disabled.

```js title=rspack.config.js
Expand Down
4 changes: 2 additions & 2 deletions website/docs/en/guide/module-federation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ Rspack supports two versions of Module Federation: Module Federation 1.0 and Mod

Detailed configuration can be found in:

- [ModuleFederationPlugin](/config/plugins.html#containermodulefederationplugin)
- [ModuleFederationPluginV1](/config/plugins.html#containermodulefederationpluginv1)
- [ModuleFederationPlugin](/plugins/webpack/module-federation-plugin)
- [ModuleFederationPluginV1](/plugins/webpack/module-federation-plugin-v1)
10 changes: 5 additions & 5 deletions website/docs/zh/blog/announcing-0.4.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ module.exports = {

### 迁移 builtin options 到 builtin plugins

Rspack 在 v0.4.0 中废弃了部分 builtin options 并迁移至 rspack [内部插件](/config/plugins.html#%E5%86%85%E9%83%A8%E6%8F%92%E4%BB%B6)。
Rspack 在 v0.4.0 中废弃了部分 builtin options 并迁移至 rspack [内部插件](/config/plugins)。

目前,rspack 的内部插件分为两类:

Expand All @@ -285,7 +285,7 @@ module.exports = {
}
```

对于 `builtins.html` 可以直接迁移到 [HtmlRspackPlugin](/config/plugins.html#htmlrspackplugin):
对于 `builtins.html` 可以直接迁移到 [HtmlRspackPlugin](/plugins/rspack/html-rspack-plugin):

```diff
+ const rspack = require("@rspack/core")
Expand All @@ -311,9 +311,9 @@ module.exports = {
};
```

对于 `builtins.copy` 可以直接迁移到 [CopyRspackPlugin](/config/plugins.html#copyrspackplugin)。
对于 `builtins.copy` 可以直接迁移到 [CopyRspackPlugin](/plugins/rspack/copy-rspack-plugin)。

原先的 `builtins.minifyOptions` 我们提供了 [SwcJsMinimizerRspackPlugin](/config/plugins.html#swcjsminimizerrspackplugin):
原先的 `builtins.minifyOptions` 我们提供了 [SwcJsMinimizerRspackPlugin](/plugins/rspack/swc-js-minimizer-rspack-plugin):

```js
const rspack = require('@rspack/core');
Expand All @@ -328,4 +328,4 @@ module.exports = {
};
```

其他内容可以直接参考 rspack [内部插件](/config/plugins.html#%E5%86%85%E9%83%A8%E6%8F%92%E4%BB%B6)进行迁移,也可以在升级到 v0.4.0 后根据 CLI 提示完成操作。
其他内容可以直接参考 rspack [内部插件](/config/plugins)进行迁移,也可以在升级到 v0.4.0 后根据 CLI 提示完成操作。
14 changes: 7 additions & 7 deletions website/docs/zh/config/builtins.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ _Builtins_ 提供的内置功能在未来可能会发生变化,或被更好的
/>

:::warning
请迁移至 [`BannerPlugin`](/config/plugins.html#bannerplugin)。
请迁移至 [`BannerPlugin`](/plugins/webpack/banner-plugin)。
:::

- **类型:**
Expand Down Expand Up @@ -341,7 +341,7 @@ module.exports = {
/>

:::warning
请迁移至 [`HtmlRspackPlugin`](/config/plugins.html#htmlrspackplugin)。
请迁移至 [`HtmlRspackPlugin`](/plugins/rspack/html-rspack-plugin)。
:::

该配置可以快速创建与 Rspack 产物关联的 HTML 文件。
Expand Down Expand Up @@ -490,7 +490,7 @@ type BuiltinsHtml = Array<{
/>

:::warning
请迁移至 [`SwcJsMinimizerRspackPlugin`](/config/plugins.html#swcjsminimizerrspackplugin)。
请迁移至 [`SwcJsMinimizerRspackPlugin`](/plugins/rspack/swc-js-minimizer-rspack-plugin)。
:::

设置内置压缩器配置。
Expand Down Expand Up @@ -593,7 +593,7 @@ type BuiltinsMinifyOptions = {
/>

:::warning
请迁移至 [`DefinePlugin`](/config/plugins.html#defineplugin)。
请迁移至 [`DefinePlugin`](/plugins/webpack/define-plugin)。
:::

此选项将会在编译时将代码中的变量替换为其他值或表达式。
Expand Down Expand Up @@ -906,7 +906,7 @@ type BuiltinsCssModules = {
/>

:::warning
请迁移至 [`ProgressPlugin`](/config/plugins.html#progressplugin)。
请迁移至 [`ProgressPlugin`](/plugins/webpack/progress-plugin)。
:::

此选项可以用来配置进度条,false 表示不显示进度条。
Expand Down Expand Up @@ -973,7 +973,7 @@ type BuiltinsCssModules = {
/>

:::warning
请迁移至 [`CopyRspackPlugin`](/config/plugins.html#copyrspackplugin)。
请迁移至 [`CopyRspackPlugin`](/plugins/rspack/copy-rspack-plugin)。
:::

import WebpackLicense from '../../../components/webpack-license';
Expand Down Expand Up @@ -1296,7 +1296,7 @@ import 'antd/es/button/style';
/>

:::warning
请迁移至 [`ProvidePlugin`](/config/plugins.html#provideplugin)。
请迁移至 [`ProvidePlugin`](/plugins/webpack/provide-plugin)。
:::

自动的将全局变量转换为模块导入,如下配置:
Expand Down
4 changes: 2 additions & 2 deletions website/docs/zh/config/optimization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ import WebpackLicense from '../../../components/webpack-license';
]}
/>

自定义压缩器。默认使用 [`rspack.SwcJsMinimizerRspackPlugin`](/config/plugins.html#swcjsminimizerrspackplugin)
和 [`rspack.SwcCssMinimizerRspackPlugin`](/config/plugins.html#swccssminimizerrspackplugin)。当声明了 `optimization.minimizer`,默认压缩器会被禁用。
自定义压缩器。默认使用 [`rspack.SwcJsMinimizerRspackPlugin`](/plugins/rspack/swc-js-minimizer-rspack-plugin)
和 [`rspack.SwcCssMinimizerRspackPlugin`](/plugins/rspack/swc-css-minimizer-rspack-plugin)。当声明了 `optimization.minimizer`,默认压缩器会被禁用。

```js title=rspack.config.js
const minifyPlugin = require('@rspack/plugin-minify');
Expand Down
4 changes: 2 additions & 2 deletions website/docs/zh/guide/module-federation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ Rspack 支持两个版本的模块联邦:模块联邦 1.0 和模块联邦 1.5

详细配置可参考:

- [ModuleFederationPlugin](/config/plugins.html#containermodulefederationplugin)
- [ModuleFederationPluginV1](/config/plugins.html#containermodulefederationpluginv1)
- [ModuleFederationPlugin](/plugins/webpack/module-federation-plugin)
- [ModuleFederationPluginV1](/plugins/webpack/module-federation-plugin-v1)
Loading