@module-federation/vite 1.14.4 → 1.15.0
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/README.md +10 -15
- package/lib/index.cjs +2519 -1878
- package/lib/index.d.cts +4 -4
- package/lib/index.d.mts +4 -4
- package/lib/index.mjs +2642 -2000
- package/package.json +3 -7
package/README.md
CHANGED
|
@@ -79,11 +79,6 @@ export default defineConfig({
|
|
|
79
79
|
server: {
|
|
80
80
|
origin: "http://localhost:{Your port}"
|
|
81
81
|
},
|
|
82
|
-
// Do you need to support build targets lower than chrome89?
|
|
83
|
-
// You can use 'vite-plugin-top-level-await' plugin for that.
|
|
84
|
-
build: {
|
|
85
|
-
target: 'chrome89',
|
|
86
|
-
},
|
|
87
82
|
[...]
|
|
88
83
|
});
|
|
89
84
|
```
|
|
@@ -157,11 +152,6 @@ export default defineConfig({
|
|
|
157
152
|
server: {
|
|
158
153
|
origin: "http://localhost:{Your port}"
|
|
159
154
|
},
|
|
160
|
-
// Do you need to support build targets lower than chrome89?
|
|
161
|
-
// You can use 'vite-plugin-top-level-await' plugin for that.
|
|
162
|
-
build: {
|
|
163
|
-
target: 'chrome89',
|
|
164
|
-
},
|
|
165
155
|
[...]
|
|
166
156
|
});
|
|
167
157
|
```
|
|
@@ -190,15 +180,20 @@ const RemoteMFE = defineAsyncComponent( 👈
|
|
|
190
180
|
</template>
|
|
191
181
|
```
|
|
192
182
|
|
|
193
|
-
## ⚠️ `codeSplitting
|
|
183
|
+
## ⚠️ `codeSplitting` settings are controlled by the plugin
|
|
184
|
+
|
|
185
|
+
Do not set either `build.rollupOptions.output.codeSplitting` or
|
|
186
|
+
`build.rolldownOptions.output.codeSplitting` to `false` with this plugin — it will be **automatically ignored**.
|
|
194
187
|
|
|
195
|
-
|
|
196
|
-
Module
|
|
188
|
+
`codeSplitting.groups` is also ignored because grouping shared-runtime chunks can break MF init order.
|
|
189
|
+
Module Federation needs `loadShare` and `runtimeInitStatus` isolated into separate chunks for correct bootstrap behavior.
|
|
197
190
|
|
|
198
191
|
## ⚠️ `manualChunks` is not supported
|
|
199
192
|
|
|
200
|
-
Do not use `build.rollupOptions.output.manualChunks`
|
|
201
|
-
|
|
193
|
+
Do not use `build.rollupOptions.output.manualChunks` or
|
|
194
|
+
`build.rolldownOptions.output.manualChunks` with this plugin — it will be **automatically ignored**.
|
|
195
|
+
The plugin manages the runtime chunk graph itself, and forcing custom chunk grouping can break Module Federation bootstrap order.
|
|
196
|
+
The plugin injects the splits it needs so `runtimeInitStatus` and `loadShare` stay isolated.
|
|
202
197
|
|
|
203
198
|
### So far so good 🎉
|
|
204
199
|
|