Skip to content

Commit 40cd3dc

Browse files
authored
doc: optimize quick start type declaration (#2282)
1 parent b5dc59c commit 40cd3dc

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

apps/website-new/docs/en/guide/start/quick-start.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,19 @@ root.render(
202202
);
203203
```
204204

205+
> Declare the `Module Federation` type path in `tsconfig.json`
206+
207+
```json
208+
{
209+
"Compiler options": {
210+
"path":{
211+
"*": ["./@mf-types/*"]
212+
}
213+
}
214+
}
215+
````
216+
217+
205218
> Add Module Federation plugin to consume remote modules
206219

207220
```typescript

apps/website-new/docs/zh/guide/start/quick-start.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,19 @@ root.render(
245245
);
246246
```
247247

248+
> `tsconfig.json` 中声明 `Module Federation` 类型路径
249+
250+
```json
251+
{
252+
"compilerOptions": {
253+
"paths": {
254+
"*": ["./@mf-types/*"]
255+
}
256+
}
257+
}
258+
```
259+
260+
248261
> 引用远程模块
249262
250263
```tsx

0 commit comments

Comments
 (0)