@modern-js/main-doc 3.0.1 → 3.0.2
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.
- package/docs/en/_nav.json +1 -1
- package/docs/en/apis/app/commands.mdx +1 -1
- package/docs/en/community/blog/_meta.json +7 -1
- package/docs/en/community/blog/v3-release-note.mdx +625 -0
- package/docs/en/components/rsbuild.mdx +1 -1
- package/docs/en/configure/app/builder-plugins.mdx +1 -1
- package/docs/en/configure/app/dev/server.mdx +6 -6
- package/docs/en/configure/app/resolve/alias-strategy.mdx +1 -1
- package/docs/en/configure/app/resolve/dedupe.mdx +1 -1
- package/docs/en/configure/app/security/sri.mdx +1 -1
- package/docs/en/configure/app/server/rsc.mdx +2 -2
- package/docs/en/configure/app/source/decorators.mdx +1 -1
- package/docs/en/configure/app/tools/bundler-chain.mdx +1 -1
- package/docs/en/configure/app/tools/swc.mdx +2 -2
- package/docs/en/guides/advanced-features/compatibility.mdx +1 -1
- package/docs/en/guides/advanced-features/page-performance/optimize-bundle.mdx +1 -1
- package/docs/en/guides/basic-features/css/css.mdx +4 -4
- package/docs/en/guides/basic-features/css/tailwindcss.mdx +2 -2
- package/docs/en/guides/basic-features/render/rsc.mdx +137 -8
- package/docs/en/guides/concept/builder.mdx +3 -3
- package/docs/en/guides/get-started/tech-stack.mdx +3 -3
- package/docs/en/guides/topic-detail/module-federation/application.mdx +6 -6
- package/docs/en/guides/topic-detail/module-federation/deploy.mdx +2 -2
- package/docs/en/guides/topic-detail/module-federation/i18n.mdx +12 -12
- package/docs/en/guides/topic-detail/module-federation/introduce.mdx +1 -1
- package/docs/en/guides/topic-detail/module-federation/ssr.mdx +4 -4
- package/docs/en/guides/topic-detail/module-federation/usage.mdx +7 -7
- package/docs/en/guides/troubleshooting/builder.mdx +4 -4
- package/docs/en/guides/upgrade/config.mdx +31 -3
- package/docs/en/plugin/cli-plugins/api.mdx +9 -9
- package/docs/en/plugin/introduction.mdx +5 -5
- package/docs/zh/_nav.json +1 -1
- package/docs/zh/apis/app/commands.mdx +1 -1
- package/docs/zh/community/blog/_meta.json +7 -1
- package/docs/zh/community/blog/v3-release-note.mdx +626 -0
- package/docs/zh/components/rsbuild.mdx +1 -1
- package/docs/zh/configure/app/builder-plugins.mdx +1 -1
- package/docs/zh/configure/app/dev/server.mdx +6 -6
- package/docs/zh/configure/app/resolve/alias-strategy.mdx +1 -1
- package/docs/zh/configure/app/resolve/dedupe.mdx +1 -1
- package/docs/zh/configure/app/security/sri.mdx +1 -1
- package/docs/zh/configure/app/server/rsc.mdx +2 -2
- package/docs/zh/configure/app/source/decorators.mdx +1 -1
- package/docs/zh/configure/app/tools/bundler-chain.mdx +1 -1
- package/docs/zh/configure/app/tools/swc.mdx +2 -2
- package/docs/zh/guides/advanced-features/compatibility.mdx +1 -1
- package/docs/zh/guides/advanced-features/page-performance/optimize-bundle.mdx +1 -1
- package/docs/zh/guides/basic-features/css/css.mdx +4 -4
- package/docs/zh/guides/basic-features/css/tailwindcss.mdx +2 -2
- package/docs/zh/guides/basic-features/render/rsc.mdx +222 -8
- package/docs/zh/guides/concept/builder.mdx +3 -3
- package/docs/zh/guides/get-started/tech-stack.mdx +3 -3
- package/docs/zh/guides/topic-detail/module-federation/application.mdx +6 -6
- package/docs/zh/guides/topic-detail/module-federation/deploy.mdx +2 -2
- package/docs/zh/guides/topic-detail/module-federation/i18n.mdx +12 -12
- package/docs/zh/guides/topic-detail/module-federation/introduce.mdx +1 -1
- package/docs/zh/guides/topic-detail/module-federation/ssr.mdx +4 -4
- package/docs/zh/guides/topic-detail/module-federation/usage.mdx +7 -7
- package/docs/zh/guides/troubleshooting/builder.mdx +4 -4
- package/docs/zh/guides/upgrade/config.mdx +31 -3
- package/docs/zh/plugin/cli-plugins/api.mdx +9 -9
- package/docs/zh/plugin/introduction.mdx +5 -5
- package/package.json +2 -2
- package/src/components/RsbuildLink/index.tsx +1 -1
- package/src/pages/index.tsx +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 开始使用
|
|
2
2
|
|
|
3
|
-
在 Modern.js 中使用 Module Federation 我们推荐使用官方插件 `@module-federation/modern-js`。
|
|
3
|
+
在 Modern.js 中使用 Module Federation 我们推荐使用官方插件 `@module-federation/modern-js-v3`。
|
|
4
4
|
|
|
5
5
|
本章节将会介绍如何通过官方插件搭含生产者应用与消费者应用,我们首先根据 [Modern.js 快速上手](/guides/get-started/quick-start) 创建两个应用。
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
import { PackageManagerTabs } from '@theme';
|
|
12
12
|
|
|
13
|
-
<PackageManagerTabs command="add @module-federation/modern-js" />
|
|
13
|
+
<PackageManagerTabs command="add @module-federation/modern-js-v3" />
|
|
14
14
|
|
|
15
15
|
## 注册插件
|
|
16
16
|
|
|
@@ -18,7 +18,7 @@ import { PackageManagerTabs } from '@theme';
|
|
|
18
18
|
|
|
19
19
|
```ts
|
|
20
20
|
import { appTools, defineConfig } from '@modern-js/app-tools';
|
|
21
|
-
import { moduleFederationPlugin } from '@module-federation/modern-js';
|
|
21
|
+
import { moduleFederationPlugin } from '@module-federation/modern-js-v3';
|
|
22
22
|
|
|
23
23
|
export default defineConfig({
|
|
24
24
|
plugins: [appTools(), moduleFederationPlugin()],
|
|
@@ -42,7 +42,7 @@ export const Button = () => {
|
|
|
42
42
|
随后,在项目根目录添加 `module-federation.config.ts`,配置 Module Federation 模块的名称、共享依赖和导出内容:
|
|
43
43
|
|
|
44
44
|
```ts title="module-federation.config.ts"
|
|
45
|
-
import { createModuleFederationConfig } from '@module-federation/modern-js';
|
|
45
|
+
import { createModuleFederationConfig } from '@module-federation/modern-js-v3';
|
|
46
46
|
|
|
47
47
|
export default createModuleFederationConfig({
|
|
48
48
|
name: 'remote',
|
|
@@ -68,7 +68,7 @@ export default createModuleFederationConfig({
|
|
|
68
68
|
|
|
69
69
|
```ts title="modern.config.ts"
|
|
70
70
|
import { appTools, defineConfig } from '@modern-js/app-tools';
|
|
71
|
-
import { moduleFederationPlugin } from '@module-federation/modern-js';
|
|
71
|
+
import { moduleFederationPlugin } from '@module-federation/modern-js-v3';
|
|
72
72
|
|
|
73
73
|
export default defineConfig({
|
|
74
74
|
server: {
|
|
@@ -85,7 +85,7 @@ export default defineConfig({
|
|
|
85
85
|
在项目根目录添加 `module-federation.config.ts`,配置 Module Federation 模块的名称、共享依赖和使用的远程模块:
|
|
86
86
|
|
|
87
87
|
```ts title="module-federation.config.ts"
|
|
88
|
-
import { createModuleFederationConfig } from '@module-federation/modern-js';
|
|
88
|
+
import { createModuleFederationConfig } from '@module-federation/modern-js-v3';
|
|
89
89
|
|
|
90
90
|
export default createModuleFederationConfig({
|
|
91
91
|
name: 'host',
|
|
@@ -170,7 +170,7 @@ export default Index;
|
|
|
170
170
|
|
|
171
171
|
```ts
|
|
172
172
|
import { appTools, defineConfig } from '@modern-js/app-tools';
|
|
173
|
-
import { moduleFederationPlugin } from '@module-federation/modern-js';
|
|
173
|
+
import { moduleFederationPlugin } from '@module-federation/modern-js-v3';
|
|
174
174
|
|
|
175
175
|
// https://modernjs.dev/en/configure/app/usage
|
|
176
176
|
export default defineConfig({
|
|
@@ -10,11 +10,11 @@ sidebar_position: 3
|
|
|
10
10
|
|
|
11
11
|
### Rsbuild FAQ
|
|
12
12
|
|
|
13
|
-
Modern.js 内部基于 [Rsbuild](https://rsbuild.
|
|
13
|
+
Modern.js 内部基于 [Rsbuild](https://v2.rsbuild.dev/) 封装了自身的构建工具,因此你可以直接参考 Rsbuild 的 FAQ 文档:
|
|
14
14
|
|
|
15
|
-
- [Rsbuild - 功能类问题](https://rsbuild.
|
|
16
|
-
- [Rsbuild - 异常类问题](https://rsbuild.
|
|
17
|
-
- [Rsbuild - 热更新问题](https://rsbuild.
|
|
15
|
+
- [Rsbuild - 功能类问题](https://v2.rsbuild.dev/zh/guide/faq/features)
|
|
16
|
+
- [Rsbuild - 异常类问题](https://v2.rsbuild.dev/zh/guide/faq/exceptions)
|
|
17
|
+
- [Rsbuild - 热更新问题](https://v2.rsbuild.dev/zh/guide/faq/hmr)
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
@@ -151,12 +151,40 @@ export default {
|
|
|
151
151
|
|
|
152
152
|
## tools
|
|
153
153
|
|
|
154
|
+
### toos.postcss
|
|
155
|
+
|
|
156
|
+
**变更内容**:对象式配置会覆盖 Modern.js 内置的 PostCSS 配置。如果需要在内置配置基础上进行扩展,请使用函数式配置。
|
|
157
|
+
|
|
158
|
+
```typescript
|
|
159
|
+
// v2
|
|
160
|
+
export default {
|
|
161
|
+
tools: {
|
|
162
|
+
postcss: {
|
|
163
|
+
postcssOptions: {
|
|
164
|
+
plugins: [tailwindcssPlugin],
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
};
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
```typescript
|
|
172
|
+
// v3
|
|
173
|
+
export default {
|
|
174
|
+
tools: {
|
|
175
|
+
postcss: (opts, { addPlugins }) => {
|
|
176
|
+
addPlugins(tailwindcssPlugin);
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
```
|
|
181
|
+
|
|
154
182
|
### tools.esbuild
|
|
155
183
|
|
|
156
184
|
**变更内容**:该配置已废弃,需要手动切换到 esbuild 压缩。
|
|
157
185
|
|
|
158
186
|
```typescript
|
|
159
|
-
// 该配置已废弃,请参考 [切换压缩器](https://rsbuild.
|
|
187
|
+
// 该配置已废弃,请参考 [切换压缩器](https://v2.rsbuild.dev/zh/config/output/minify#%E5%88%87%E6%8D%A2%E5%8E%8B%E7%BC%A9%E5%99%A8) 来手动切换到 esbuild 压缩
|
|
160
188
|
// tools: {
|
|
161
189
|
// esbuild: { /* 配置 */ }
|
|
162
190
|
// },
|
|
@@ -167,7 +195,7 @@ export default {
|
|
|
167
195
|
**变更内容**:该配置已废弃,需要手动切换到 Terser 压缩。
|
|
168
196
|
|
|
169
197
|
```typescript
|
|
170
|
-
// 该配置已废弃,请参考 [切换压缩器](https://rsbuild.
|
|
198
|
+
// 该配置已废弃,请参考 [切换压缩器](https://v2.rsbuild.dev/zh/config/output/minify#%E5%88%87%E6%8D%A2%E5%8E%8B%E7%BC%A9%E5%99%A8) 来手动切换到 Terser 压缩
|
|
171
199
|
// tools: {
|
|
172
200
|
// terser: { /* 配置 */ }
|
|
173
201
|
// },
|
|
@@ -893,7 +921,7 @@ export default defineRuntimeConfig({
|
|
|
893
921
|
|
|
894
922
|
### performance.bundleAnalyze
|
|
895
923
|
|
|
896
|
-
**变更内容**:该配置已废弃,建议使用 [Rsdoctor](https://rsbuild.
|
|
924
|
+
**变更内容**:该配置已废弃,建议使用 [Rsdoctor](https://v2.rsbuild.dev/zh/guide/debug/rsdoctor) 来分析产物体积
|
|
897
925
|
|
|
898
926
|
### performance.transformLodash
|
|
899
927
|
|
|
@@ -188,7 +188,7 @@ api.config(() => {
|
|
|
188
188
|
- **参数:**
|
|
189
189
|
- `modifyFn`: 修改函数,接收 `RspackChain` 实例和实用工具作为参数。
|
|
190
190
|
- **执行阶段:** 在生成最终的 Rspack 配置时。
|
|
191
|
-
- **对应 Rsbuild Hook**: [modifybundlerchain](https://rsbuild.
|
|
191
|
+
- **对应 Rsbuild Hook**: [modifybundlerchain](https://v2.rsbuild.dev/zh/plugins/dev/hooks#modifybundlerchain)
|
|
192
192
|
- **示例:**
|
|
193
193
|
|
|
194
194
|
```typescript
|
|
@@ -208,7 +208,7 @@ api.modifyBundlerChain((chain, utils) => {
|
|
|
208
208
|
- **参数:**
|
|
209
209
|
- `modifyFn`: 修改函数,接收 Rsbuild 配置对象和实用工具作为参数,可以返回修改后的配置对象、Promise 或不返回(直接修改原对象)。
|
|
210
210
|
- **执行阶段:** 在生成最终的 Rsbuild 配置时。
|
|
211
|
-
- **对应 Rsbuild Hook**: [modifyRsbuildConfig](https://rsbuild.
|
|
211
|
+
- **对应 Rsbuild Hook**: [modifyRsbuildConfig](https://v2.rsbuild.dev/zh/plugins/dev/hooks#modifyrsbuildconfig)
|
|
212
212
|
- **示例:**
|
|
213
213
|
|
|
214
214
|
```typescript
|
|
@@ -228,7 +228,7 @@ api.modifyRsbuildConfig((config, utils) => {
|
|
|
228
228
|
- **参数:**
|
|
229
229
|
- `modifyFn`: 修改函数,接收 Rspack 配置对象和实用工具作为参数,可以返回修改后的配置对象、Promise 或不返回(直接修改原对象)。
|
|
230
230
|
- **执行阶段:** 在生成最终的 Rspack 配置时。
|
|
231
|
-
- **对应 Rsbuild Hook**: [modifyRspackConfig](https://rsbuild.
|
|
231
|
+
- **对应 Rsbuild Hook**: [modifyRspackConfig](https://v2.rsbuild.dev/zh/plugins/dev/hooks#modifyrspackconfig)
|
|
232
232
|
- **示例:**
|
|
233
233
|
|
|
234
234
|
```typescript
|
|
@@ -403,7 +403,7 @@ api.onFileChanged(({ filename, eventType }) => {
|
|
|
403
403
|
- **参数:**
|
|
404
404
|
- `buildFn`: 构建前执行的函数,无参数,可异步。
|
|
405
405
|
- **执行阶段:** 在执行构建流程之前。
|
|
406
|
-
- **对应 Rsbuild Hook**: [onBeforeBuild](https://rsbuild.
|
|
406
|
+
- **对应 Rsbuild Hook**: [onBeforeBuild](https://v2.rsbuild.dev/zh/plugins/dev/hooks#onbeforebuild)
|
|
407
407
|
- **示例:**
|
|
408
408
|
|
|
409
409
|
```typescript
|
|
@@ -422,7 +422,7 @@ api.onBeforeBuild(() => {
|
|
|
422
422
|
- **参数:**
|
|
423
423
|
- `buildFn`: 构建后执行的函数,无参数,可异步。
|
|
424
424
|
- **执行阶段:** 在执行构建流程之后。
|
|
425
|
-
- **对应 Rsbuild Hook**: [onAfterBuild](https://rsbuild.
|
|
425
|
+
- **对应 Rsbuild Hook**: [onAfterBuild](https://v2.rsbuild.dev/zh/plugins/dev/hooks#onafterbuild)
|
|
426
426
|
- **示例:**
|
|
427
427
|
|
|
428
428
|
```typescript
|
|
@@ -441,7 +441,7 @@ api.onAfterBuild(() => {
|
|
|
441
441
|
- **参数:**
|
|
442
442
|
- `compileFn`: 编译完成后执行的函数。
|
|
443
443
|
- **执行阶段:** 开发服务器启动,且首次编译完成后。
|
|
444
|
-
- **对应 Rsbuild Hook**: [onDevCompileDone](https://rsbuild.
|
|
444
|
+
- **对应 Rsbuild Hook**: [onDevCompileDone](https://v2.rsbuild.dev/zh/plugins/dev/hooks#ondevcompiledone)
|
|
445
445
|
- **示例:**
|
|
446
446
|
|
|
447
447
|
```typescript
|
|
@@ -460,7 +460,7 @@ api.onDevCompileDone(() => {
|
|
|
460
460
|
- **参数:**
|
|
461
461
|
- `createFn`: 创建前执行的函数,无参数,可异步。
|
|
462
462
|
- **执行阶段:** 在创建 Rspack 编译器实例之前。
|
|
463
|
-
- **对应 Rsbuild Hook**: [onBeforeCreateCompiler](https://rsbuild.
|
|
463
|
+
- **对应 Rsbuild Hook**: [onBeforeCreateCompiler](https://v2.rsbuild.dev/zh/plugins/dev/hooks#onbeforecreatecompiler)
|
|
464
464
|
- **示例:**
|
|
465
465
|
|
|
466
466
|
```typescript
|
|
@@ -479,7 +479,7 @@ api.onBeforeCreateCompiler(() => {
|
|
|
479
479
|
- **参数:**
|
|
480
480
|
- `createFn`: 创建后执行的函数,无参数,可异步。
|
|
481
481
|
- **执行阶段:** 在创建 Rspack 编译器实例之后。
|
|
482
|
-
- **对应 Rsbuild Hook**: [onAfterCreateCompiler](https://rsbuild.
|
|
482
|
+
- **对应 Rsbuild Hook**: [onAfterCreateCompiler](https://v2.rsbuild.dev/zh/plugins/dev/hooks#onaftercreatecompiler)
|
|
483
483
|
- **示例:**
|
|
484
484
|
|
|
485
485
|
```typescript
|
|
@@ -517,7 +517,7 @@ api.onBeforeDev(async () => {
|
|
|
517
517
|
- **参数:**
|
|
518
518
|
- `devFn`: 开发服务器启动后执行的函数。
|
|
519
519
|
- **执行阶段:** 开发服务器成功启动后。
|
|
520
|
-
- **对应 Rsbuild Hook**: [onAfterStartDevServer](https://rsbuild.
|
|
520
|
+
- **对应 Rsbuild Hook**: [onAfterStartDevServer](https://v2.rsbuild.dev/zh/plugins/dev/hooks#onafterstartdevserver)
|
|
521
521
|
- **示例:**
|
|
522
522
|
|
|
523
523
|
```typescript
|
|
@@ -117,7 +117,7 @@ Rsbuild 是 Modern.js 底层的构建工具,通过添加 Rsbuild 插件可修
|
|
|
117
117
|
你可以在 `modern.config.ts` 中通过 `builderPlugins` 选项注册 Rsbuild 插件,详见 [builderPlugins 构建插件](/configure/app/builder-plugins.html)。
|
|
118
118
|
|
|
119
119
|
:::info
|
|
120
|
-
可以阅读 [Rsbuild 官网 - 插件](https://rsbuild.
|
|
120
|
+
可以阅读 [Rsbuild 官网 - 插件](https://v2.rsbuild.dev/plugins/list/index) 了解更多 Rsbuild 插件体系内容。
|
|
121
121
|
:::
|
|
122
122
|
|
|
123
123
|
### 官方插件
|
|
@@ -128,9 +128,9 @@ Rsbuild 是 Modern.js 底层的构建工具,通过添加 Rsbuild 插件可修
|
|
|
128
128
|
|
|
129
129
|
| 插件 | 介绍 | Modern.js 链接 |
|
|
130
130
|
| ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
|
131
|
-
| [React 插件](https://rsbuild.
|
|
132
|
-
| [SVGR 插件](https://rsbuild.
|
|
133
|
-
| [Assets Retry 插件](https://
|
|
131
|
+
| [React 插件](https://v2.rsbuild.dev/zh/plugins/list/plugin-react) | 提供对 React 的支持 | - |
|
|
132
|
+
| [SVGR 插件](https://v2.rsbuild.dev/zh/plugins/list/plugin-svgr) | 支持将 SVG 图片转换为一个 React 组件 | [output.disableSvgr](/configure/app/output/disable-svgr)<br />[output.svgDefaultExport](/configure/app/output/svg-default-export) |
|
|
133
|
+
| [Assets Retry 插件](https://github.com/rstackjs/rsbuild-plugin-assets-retry) | 用于在静态资源加载失败时自动发起重试请求 | [output.assetsRetry](/configure/app/output/assets-retry.html) |
|
|
134
134
|
| [Type Check 插件](https://github.com/rspack-contrib/rsbuild-plugin-type-check) | 用于在单独的进程中运行 TypeScript 类型检查 | [output.disableTsChecker](/configure/app/output/disable-ts-checker.html)<br />[tools.tsChecker](/configure/app/tools/ts-checker.html) |
|
|
135
135
|
| [Source Build 插件](https://github.com/rspack-contrib/rsbuild-plugin-source-build) | 用于 monorepo 场景,支持引用其他子目录的源代码,并完成构建和热更新 | [experiments.sourceBuild](/configure/app/experiments/source-build.html) |
|
|
136
136
|
| [Check Syntax 插件](https://github.com/rspack-contrib/rsbuild-plugin-check-syntax) | 用于分析产物的语法兼容性,判断是否存在导致兼容性问题的高级语法 | [security.checkSyntax](/configure/app/security/check-syntax.html) |
|
|
@@ -142,7 +142,7 @@ Rsbuild 是 Modern.js 底层的构建工具,通过添加 Rsbuild 插件可修
|
|
|
142
142
|
以下是未在 Modern.js 中内置的 Rsbuild 官方插件:
|
|
143
143
|
|
|
144
144
|
- [Image Compress 插件](https://github.com/rspack-contrib/rsbuild-plugin-image-compress):将项目中用到的图片资源进行压缩处理。
|
|
145
|
-
- [Stylus 插件](https://rsbuild.
|
|
145
|
+
- [Stylus 插件](https://v2.rsbuild.dev/zh/plugins/list/plugin-stylus):使用 Stylus 作为 CSS 预处理器。
|
|
146
146
|
- [UMD 插件](https://github.com/rspack-contrib/rsbuild-plugin-umd):用于构建 UMD 格式的产物。
|
|
147
147
|
- [YAML 插件](https://github.com/rspack-contrib/rsbuild-plugin-yaml):用于引用 YAML 文件,并将其转换为 JavaScript 对象。
|
|
148
148
|
- [TOML 插件](https://github.com/rspack-contrib/rsbuild-plugin-toml):用于引用 TOML 文件,并将其转换为 JavaScript 对象。
|
package/package.json
CHANGED
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
"modern",
|
|
17
17
|
"modern.js"
|
|
18
18
|
],
|
|
19
|
-
"version": "3.0.
|
|
19
|
+
"version": "3.0.2",
|
|
20
20
|
"publishConfig": {
|
|
21
21
|
"registry": "https://registry.npmjs.org/",
|
|
22
22
|
"access": "public"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"mermaid": "^11.12.2",
|
|
26
|
-
"@modern-js/sandpack-react": "3.0.
|
|
26
|
+
"@modern-js/sandpack-react": "3.0.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@rsbuild/plugin-sass": "1.5.0",
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
|
|
4
4
|
const RsbuildLink = ({ configName }: { configName: string }) => {
|
|
5
5
|
const lang = useLang();
|
|
6
|
-
const href = `https://v2.rsbuild.
|
|
6
|
+
const href = `https://v2.rsbuild.dev/${lang === 'zh' ? 'zh/' : ''}config/${configName
|
|
7
7
|
.split('.')
|
|
8
8
|
.join('/')
|
|
9
9
|
.replace(/([a-z])([A-Z])/g, '$1-$2')
|
package/src/pages/index.tsx
CHANGED