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
- Performs on-demand builds and export optimization for `shared` dependencies in Module Federation.
9
-
- When `reshake` is false, enables `SharedUsedExportsOptimizerPlugin` to inject runtime used-exports.
10
-
- If any shared entry has `treeshake: true` and `import !== false`, uses `IndependentSharedPlugin` to build independent artifacts per shared package and write back to stats/manifest.
8
+
9
+
- Performs on-demand build and export optimization for `shared` dependencies based on Module Federation configuration.
11
10
12
11
**Options**
13
-
-`mfConfig`: `ModuleFederationPluginOptions` with `name`, `shared`, `library`, `manifest`, `injectUsedExports`.
14
-
-`plugins`: extra plugins reused in independent builds.
15
-
-`reshake`: whether to perform additional tree-shaking during independent builds.
12
+
13
+
-`mfConfig`: `ModuleFederationPluginOptions`, configuration passed to the Module Federation plugin.
14
+
-`plugins`: extra plugins reused during independent builds.
15
+
-`reshake`: whether to perform a second tree-shake during independent builds (typically used when the deployment platform has determined complete dependency info and triggers a fresh build to improve tree-shake accuracy for shared dependencies).
- Normalizes `shared` into `[shareName, SharedConfig][]`.
44
-
- Registers `SharedUsedExportsOptimizerPlugin` when `reshake` is `false` to inject used exports from stats.
45
-
- Triggers independent compilation for `treeshake` entries and writes produced assets back into stats/manifest.
46
42
43
+
- Normalizes `shared` into `[shareName, SharedConfig][]`.
44
+
- Registers `SharedUsedExportsOptimizerPlugin` when `reshake` is `false` to inject used-exports from the stats manifest.
45
+
- Triggers independent compilation for shared entries with `treeshake: true`, and writes the produced assets back to the `stats/manifest` (fallback fields).
0 commit comments