@module-federation/vite 1.15.5 → 1.16.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 CHANGED
@@ -54,6 +54,33 @@ With **@module-federation/vite**, the process becomes delightfully simple, you w
54
54
  > This example is with [Vue.js](https://vuejs.org/)</br>
55
55
  > The @module-federation/vite configuration remains the same for different frameworks.
56
56
 
57
+ ## Dedicated configuration file
58
+
59
+ You can keep Module Federation options in `module-federation.config.ts`.
60
+
61
+ ```ts
62
+ import { createModuleFederationConfig } from '@module-federation/vite';
63
+
64
+ export default createModuleFederationConfig({
65
+ name: 'remote',
66
+ filename: 'remoteEntry.js',
67
+ exposes: {
68
+ './remote-app': './src/App.vue',
69
+ },
70
+ shared: ['vue'],
71
+ });
72
+ ```
73
+
74
+ ```ts
75
+ import { defineConfig } from 'vite';
76
+ import { federation } from '@module-federation/vite';
77
+ import moduleFederationConfig from './module-federation.config';
78
+
79
+ export default defineConfig({
80
+ plugins: [federation(moduleFederationConfig)],
81
+ });
82
+ ```
83
+
57
84
  ## The Remote Application configuration
58
85
 
59
86
  file: **remote/vite.config.ts**