Skip to content

Commit 2c026fb

Browse files
committed
docs: remove p label
1 parent 5942c97 commit 2c026fb

File tree

10 files changed

+21
-24
lines changed

10 files changed

+21
-24
lines changed

apps/website-new/docs/en/guide/basic/cli.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Command Line Tool
22

3-
<p>
43
{props.name || 'Module Federation'} provides lightweight command-line tools: {(props.cmdTools || ['@module-federation/enhanced', '@module-federation/modern-js']).map((cmdTool,index,arr)=>(<><code>{cmdTool}</code>{index+1===arr.length ? '':' and '}</>))} .
5-
</p>
64

75
## View All Commands
86

@@ -24,17 +22,15 @@ import ViewAllCmdsMdx from '@components/common/cli/view-all-cmds-en';
2422

2523
## {props.cmd || 'mf'} dts
2624

27-
<p>
2825
The <code>{props.cmd || 'mf'} dts</code> command is used to pull or generate TypeScript type declaration files.
29-
</p>
3026

3127
import CommandInfo from '@components/common/cli/cmd-info';
3228

3329
{props.commandInfo || <CommandInfo />}
3430

3531
:::info 注意
3632

37-
<p>The <code>{props.cmd || 'mf'} dts</code> command will automatically generate or pull type declaration files based on the configuration in <code>{props.configName || 'module-federation.config.ts'}</code>. This means you must provide a valid configuration file, otherwise the command will not run correctly.</p>
33+
The <code>{props.cmd || 'mf'} dts</code> command will automatically generate or pull type declaration files based on the configuration in <code>{props.configName || 'module-federation.config.ts'}</code>. This means you must provide a valid configuration file, otherwise the command will not run correctly.
3834

3935
If you are only using the runtime API, you need to create a temporary <code>{props.configName || 'module-federation.config.ts'}</code> file, configure [dts.consumeTypes.remoteTypeUrls](../../configure/dts#remotetypeurls), and then run the `mf dts` command.
4036

apps/website-new/docs/en/guide/basic/rspress.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Document fragments support passing parameters, which are consumed as props.
4949
If you need to use the `cmdTools` variable in a document fragment, you can refer to the following:
5050

5151
```mdx title='docs/zh/guide/intro.mdx'
52-
{(props.cmdTools || ['pkg-a', 'pkg-b']).map(cmdTool=>(<p><code>{cmdTool}</code></p>))}
52+
{(props.cmdTools || ['pkg-a', 'pkg-b']).map(cmdTool=>(<code>{cmdTool}</code>))}
5353
```
5454

5555
## Configuration

apps/website-new/docs/en/guide/basic/type-prompt.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
Just like an NPM Package, {props.name || 'Module Federation'} artifacts also generate types and enjoy hot-reloading of types, even though the artifacts are hosted on a remote CDN.
44

5-
<p><code>{props.pkgName || '@module-federation/enhanced'}</code> has type hinting enabled by default. This article will introduce several common usage scenarios and their specific configurations.</p>
5+
<code>{props.pkgName || '@module-federation/enhanced'}</code> has type hinting enabled by default. This article will introduce several common usage scenarios and their specific configurations.
66

77
## Usage Scenarios
88

99
### Generating Types
1010

11-
<p>When building with the build plugin provided by <code>{props.pkgName || '@module-federation/enhanced'}</code>, type files are automatically generated.</p>
11+
When building with the build plugin provided by <code>{props.pkgName || '@module-federation/enhanced'}</code>, type files are automatically generated.
1212

1313
### Loading Types
1414

apps/website-new/docs/en/guide/debug/mode.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ localStorage.setItem('FEDERATION_DEBUG','true')
2222

2323
After enabling debug mode, you can see the following information in the console:
2424

25-
<p>In debug mode, you will see some logs starting with [ <code>{props.name || 'Module Federation'}</code> ] output in the terminal.</p>
25+
In debug mode, you will see some logs starting with [ <code>{props.name || 'Module Federation'}</code> ] output in the terminal.

apps/website-new/docs/zh/guide/basic/cli.mdx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# 命令行工具
22

3-
<p>
43
{props.name || 'Module Federation'} 提供了轻量的命令行工具:{(props.cmdTools || ['@module-federation/enhanced', '@module-federation/modern-js']).map((cmdTool,index,arr)=>(<><code>{cmdTool}</code>{index+1===arr.length ? '':''}</>))}
5-
</p>
64

75
## 查看所有命令
86

@@ -24,19 +22,17 @@ import ViewAllCmdsMdx from '@components/common/cli/view-all-cmds';
2422

2523
## {props.cmd || 'mf'} dts
2624

27-
<p>
2825
<code>{props.cmd || 'mf'} dts</code>
2926
命令用于拉取或生成 TypeScript 类型声明文件。
30-
</p>
3127

3228
import CommandInfo from '@components/common/cli/cmd-info';
3329

3430
{props.commandInfo || <CommandInfo />}
3531

3632
:::info 注意
3733

38-
<p><code>{props.cmd || 'mf'} dts</code> 命令会自动根据 <code>{props.configName || 'module-federation.config.ts'}</code> 中的配置生成或拉取类型声明文件。 这意味着你必须提供一个有效的配置文件,否则命令将无法正常运行。</p>
34+
<code>{props.cmd || 'mf'} dts</code> 命令会自动根据 <code>{props.configName || 'module-federation.config.ts'}</code> 中的配置生成或拉取类型声明文件。 这意味着你必须提供一个有效的配置文件,否则命令将无法正常运行。
3935

40-
<p>如果你是只使用了 runtime API,那么你需要创建一份临时的 <code>{props.configName || 'module-federation.config.ts'}</code> 文件,配置 [dts.consumeTypes.remoteTypeUrls](../../configure/dts#remotetypeurls),然后运行 <code>{props.cmd || 'mf'} dts</code> 命令。</p>
36+
如果你是只使用了 runtime API,那么你需要创建一份临时的 <code>{props.configName || 'module-federation.config.ts'}</code> 文件,配置 [dts.consumeTypes.remoteTypeUrls](../../configure/dts#remotetypeurls),然后运行 <code>{props.cmd || 'mf'} dts</code> 命令。
4137

4238
:::

apps/website-new/docs/zh/guide/basic/rspress.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import Intro from 'mf-doc/intro-zh';
4949
假设你需要在文档片段中使用 `cmdTools` 变量,可以参考下方内容:
5050

5151
```mdx title='docs/zh/guide/intro.mdx'
52-
{(props.cmdTools || ['pkg-a', 'pkg-b']).map(cmdTool=>(<p><code>{cmdTool}</code></p>))}
52+
{(props.cmdTools || ['pkg-a', 'pkg-b']).map(cmdTool=>(<code>{cmdTool}</code>))}
5353
```
5454

5555
## 配置

apps/website-new/docs/zh/guide/basic/type-prompt.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
就像 NPM Package 一样,{props.name || 'Module Federation'} 产物同样会生成类型,并且享有类型热加载,尽管产物托管在远程 CDN 上。
44

5-
<p><code>{props.pkgName || '@module-federation/enhanced'}</code> 默认开启类型提示功能,本文将介绍几种常见的使用场景以及具体配置。</p>
5+
<code>{props.pkgName || '@module-federation/enhanced'}</code> 默认开启类型提示功能,本文将介绍几种常见的使用场景以及具体配置。
66

77
## 使用场景
88

99
### 生成类型
1010

11-
<p>使用<code>{props.pkgName || '@module-federation/enhanced'}</code> 提供的构建插件进行构建,会自动生成类型文件。</p>
11+
使用<code>{props.pkgName || '@module-federation/enhanced'}</code> 提供的构建插件进行构建,会自动生成类型文件。
1212

1313
### 加载类型
1414

apps/website-new/docs/zh/guide/debug/mode.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ localStorage.setItem('FEDERATION_DEBUG','true')
2222

2323
开启调试模式后,你可以在控制台看到如下信息:
2424

25-
<p>在调试模式下,你会看到 terminal 中输出了一些以 [ <code>{props.name || 'Module Federation'}</code> ] 开头的日志。</p>
25+
在调试模式下,你会看到 terminal 中输出了一些以 [ <code>{props.name || 'Module Federation'}</code> ] 开头的日志。

packages/rsbuild-plugin/src/utils/ssr.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import path from 'path';
2+
import { createRequire } from 'node:module';
23
import { encodeName } from '@module-federation/sdk';
4+
import { CALL_NAME_MAP } from '../constant';
35

46
import type { EnvironmentConfig, RsbuildConfig, Rspack } from '@rsbuild/core';
57
import type { moduleFederationPlugin } from '@module-federation/sdk';
6-
import { CALL_NAME_MAP } from '../constant';
8+
9+
const require = createRequire(import.meta.url);
710

811
export const SSR_DIR = 'ssr';
912
export const SSR_ENV_NAME = 'mf-ssr';
@@ -117,11 +120,13 @@ export function createSSRMFConfig(
117120
};
118121

119122
ssrMFConfig.runtimePlugins.push(
120-
require.resolve('@module-federation/node/runtimePlugin'),
123+
// @ts-ignore
124+
import.meta.resolve('@module-federation/node/runtimePlugin'),
121125
);
122126
if (isDev()) {
123127
ssrMFConfig.runtimePlugins.push(
124-
require.resolve(
128+
// @ts-ignore
129+
import.meta.resolve(
125130
'@module-federation/node/record-dynamic-remote-entry-hash-plugin',
126131
),
127132
);

packages/rsbuild-plugin/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"rootDir": "./",
55
"outDir": "dist",
66
"sourceMap": false,
7-
"module": "commonjs",
8-
"target": "ES2015",
7+
"module": "es2022",
8+
"target": "es2022",
99
"skipLibCheck": true,
1010
"moduleResolution": "node",
1111
"allowJs": false,

0 commit comments

Comments
 (0)