@rsdoctor/docs 1.0.0-alpha.3 → 1.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -25,29 +25,7 @@ module.exports = {
|
|
|
25
25
|
|
|
26
26
|
### Rsbuild
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
```js title="rsbuild.config.ts"
|
|
31
|
-
import { RsdoctorRspackPlugin } from '@rsdoctor/rspack-plugin';
|
|
32
|
-
|
|
33
|
-
export default {
|
|
34
|
-
// ...
|
|
35
|
-
tools: {
|
|
36
|
-
rspack(config, { appendPlugins }) {
|
|
37
|
-
// Only register the plugin when RSDOCTOR is true, as the plugin will increase the build time.
|
|
38
|
-
if (process.env.RSDOCTOR) {
|
|
39
|
-
appendPlugins(
|
|
40
|
-
new RsdoctorRspackPlugin({
|
|
41
|
-
// plugin options
|
|
42
|
-
}),
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
- **Options:** The plugin provides some configurations, please refer to [Options](../../config/options/options).
|
|
28
|
+
Rsbuild has built-in support for Rsdoctor, so you don't need to manually register plugins. See [Rsbuild - Use Rsdoctor](https://rsbuild.dev/guide/debug/rsdoctor) for more details.
|
|
51
29
|
|
|
52
30
|
### Webpack
|
|
53
31
|
|
|
@@ -25,29 +25,7 @@ module.exports = {
|
|
|
25
25
|
|
|
26
26
|
### Rsbuild 项目
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
```js title="rsbuild.config.ts"
|
|
31
|
-
import { RsdoctorRspackPlugin } from '@rsdoctor/rspack-plugin';
|
|
32
|
-
|
|
33
|
-
export default {
|
|
34
|
-
// ...
|
|
35
|
-
tools: {
|
|
36
|
-
rspack(config, { appendPlugins }) {
|
|
37
|
-
// 仅在 RSDOCTOR 为 true 时注册插件,因为插件会增加构建耗时
|
|
38
|
-
if (process.env.RSDOCTOR) {
|
|
39
|
-
appendPlugins(
|
|
40
|
-
new RsdoctorRspackPlugin({
|
|
41
|
-
// 插件选项
|
|
42
|
-
}),
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
- **Options:** 插件提供了一些配置项,请参考 [Options](../../config/options/options)。
|
|
28
|
+
Rsbuild 内置了对 Rsdoctor 的支持,不需要手动注册插件。详见 [Rsbuild - 使用 Rsdoctor](https://rsbuild.dev/zh/guide/debug/rsdoctor)。
|
|
51
29
|
|
|
52
30
|
### Webpack 项目
|
|
53
31
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/docs",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-beta.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rsdoctor",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"registry": "https://registry.npmjs.org/"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@rspress/plugin-rss": "
|
|
22
|
+
"@rspress/plugin-rss": "1.41.0",
|
|
23
23
|
"@types/node": "^16",
|
|
24
24
|
"@types/react": "^18.3.18",
|
|
25
25
|
"@types/react-dom": "^18.3.5",
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"rspress-plugin-font-open-sans": "^1.0.0",
|
|
31
31
|
"rspress-plugin-sitemap": "^1.1.1",
|
|
32
32
|
"typescript": "^5.2.2",
|
|
33
|
-
"@rsdoctor/types": "1.0.0-
|
|
33
|
+
"@rsdoctor/types": "1.0.0-beta.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@rstack-dev/doc-ui": "1.
|
|
36
|
+
"@rstack-dev/doc-ui": "1.6.0",
|
|
37
37
|
"react-markdown": "^9.0.3",
|
|
38
|
-
"rspress": "
|
|
38
|
+
"rspress": "1.41.0"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"dev": "rspress dev",
|