@module-federation/vite 1.11.1 → 1.12.1-next.1
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 +7 -0
- package/lib/index.cjs +404 -127
- package/lib/index.d.cts +7 -0
- package/lib/index.d.mts +7 -0
- package/lib/index.mjs +398 -118
- package/package.json +29 -25
package/README.md
CHANGED
|
@@ -124,6 +124,12 @@ export default defineConfig({
|
|
|
124
124
|
// Timeout for parsing modules in seconds.
|
|
125
125
|
// Defaults to 10 seconds.
|
|
126
126
|
moduleParseTimeout: 10,
|
|
127
|
+
// Idle timeout for parsing modules in seconds. When set, the timeout
|
|
128
|
+
// resets on every parsed module and only fires when there has been no
|
|
129
|
+
// module activity for the configured duration. Prefer this over
|
|
130
|
+
// moduleParseTimeout for large codebases where total build time may
|
|
131
|
+
// exceed the fixed timeout value.
|
|
132
|
+
moduleParseIdleTimeout: 10,
|
|
127
133
|
}),
|
|
128
134
|
],
|
|
129
135
|
server: {
|
|
@@ -141,6 +147,7 @@ export default defineConfig({
|
|
|
141
147
|
The host app configuration specifies its name, the filename of its exposed remote entry remoteEntry.js, and importantly, the configuration of the remote application to load.
|
|
142
148
|
You can specify the place the host initialization file is injected with the **hostInitInjectLocation** option, which is described in the example code above.
|
|
143
149
|
The **moduleParseTimeout** option allows you to configure the maximum time to wait for module parsing during the build process.
|
|
150
|
+
The **moduleParseIdleTimeout** option is an alternative that resets the timer on every parsed module. It only fires when there has been no module activity for the configured duration, making it suitable for large codebases where the total build time exceeds the fixed timeout.
|
|
144
151
|
|
|
145
152
|
## Load the Remote App
|
|
146
153
|
|