You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/website-new/docs/en/configure/experiments.mdx
+2-28Lines changed: 2 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,32 +2,6 @@
2
2
3
3
The `experiments` configuration enables advanced and experimental capabilities in the plugin.
4
4
5
-
- Example
6
-
7
-
```ts
8
-
newModuleFederationPlugin({
9
-
name: '@demo/host',
10
-
experiments: {
11
-
asyncStartup: true,
12
-
externalRuntime: false,
13
-
provideExternalRuntime: false,
14
-
optimization: {
15
-
disableSnapshot: false,
16
-
target: 'web',
17
-
},
18
-
},
19
-
shared: {
20
-
react: {
21
-
singleton: true,
22
-
},
23
-
'react-dom': {
24
-
singleton: true,
25
-
},
26
-
},
27
-
//...
28
-
});
29
-
```
30
-
31
5
## asyncStartup
32
6
33
7
-**Type:**`boolean`
@@ -50,7 +24,7 @@ When using this mode, all entrypoints will initialize asynchronously. If you're
50
24
-**Required:** No
51
25
-**Default:**`false`
52
26
53
-
After setting `true`, the external MF runtime will be used and the runtime provided by the consumer will be used. (Please make sure your consumer has `provideExternalRuntime: true` set, otherwise it will not run properly!)
27
+
After setting `true`, the external {props.name||'Module Federation'} runtime will be used and the runtime provided by the consumer will be used. (Please make sure your consumer has `provideExternalRuntime: true` set, otherwise it will not run properly!)
54
28
55
29
## provideExternalRuntime
56
30
@@ -62,7 +36,7 @@ After setting `true`, the external MF runtime will be used and the runtime provi
62
36
Make sure to only configure it on the topmost consumer! If multiple consumers inject runtime at the same time, the ones executed later will not overwrite the existing runtime.
63
37
:::
64
38
65
-
Setting `true` will inject the MF runtime at the consumer.
39
+
Setting `true` will inject the {props.name||'Module Federation'} runtime at the consumer.
0 commit comments