@module-federation/vite 1.0.0-alpha-c13dc95 → 1.0.0-alpha-31ab3f9
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 +19 -6
- package/lib/index.cjs +664 -318
- package/lib/index.esm.js +666 -320
- package/lib/index.modern.js +646 -323
- package/lib/index.umd.js +667 -321
- package/lib/plugins/pluginDevProxyModuleTopLevelAwait.d.ts +2 -0
- package/lib/plugins/pluginMFManifest.d.ts +3 -0
- package/lib/utils/VirtualModule.d.ts +5 -3
- package/lib/utils/localSharedImportMap_temp.d.ts +2 -0
- package/lib/utils/normalizeModuleFederationOptions.d.ts +8 -2
- package/lib/utils/packageNameUtils.d.ts +7 -3
- package/lib/virtualModules/index.d.ts +4 -3
- package/lib/virtualModules/virtualRemoteEntry.d.ts +5 -0
- package/lib/virtualModules/virtualRemotes.d.ts +6 -8
- package/lib/virtualModules/virtualRuntimeInitStatus.d.ts +3 -0
- package/lib/virtualModules/virtualShared_preBuild.d.ts +0 -6
- package/package.json +2 -2
- package/lib/utils/localSharedImportMap_windows.d.ts +0 -2
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Vite plugin for Module Federation
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@module-federation/vite)
|
|
4
|
+
|
|
3
5
|
## Reason why 🤔
|
|
4
6
|
|
|
5
7
|
[Microservices](https://martinfowler.com/articles/microservices.html) nowadays is a well-known concept and maybe you are using it in your current company.
|
|
@@ -15,6 +17,14 @@ This plugin makes Module Federation work together with [Vite](https://vitejs.dev
|
|
|
15
17
|
|
|
16
18
|
### [More examples here](https://github.com/module-federation/vite/tree/main/examples)<br>
|
|
17
19
|
|
|
20
|
+
```
|
|
21
|
+
pnpm install && pnpm run dev-vv # vite+vite dev demo
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
pnpm install && pnpm run preview-vv # vite+vite build demo
|
|
26
|
+
```
|
|
27
|
+
|
|
18
28
|
## Getting started 🚀
|
|
19
29
|
|
|
20
30
|
https://module-federation.io/guide/basic/webpack.html
|
|
@@ -37,15 +47,17 @@ export default defineConfig({
|
|
|
37
47
|
remote3:
|
|
38
48
|
'remote1@https://unpkg.com/react-manifest-example_remote1@1.0.6/dist/mf-manifest.json',
|
|
39
49
|
// "remote4": {
|
|
40
|
-
// entry: "http://localhost:
|
|
41
|
-
// globalEntryName: "
|
|
42
|
-
// type: "
|
|
50
|
+
// entry: "http://localhost:xxxx/remoteEntry.js",
|
|
51
|
+
// globalEntryName: "xxxx",
|
|
52
|
+
// type: "module"
|
|
43
53
|
// }
|
|
44
54
|
},
|
|
45
55
|
exposes: {
|
|
46
56
|
'./App': './src/App.vue',
|
|
47
57
|
},
|
|
48
|
-
filename: '
|
|
58
|
+
filename: 'remoteEntry-[hash].js',
|
|
59
|
+
// https://github.com/module-federation/vite/issues/87
|
|
60
|
+
manifest: true,
|
|
49
61
|
shared: {
|
|
50
62
|
vue: {},
|
|
51
63
|
react: {
|
|
@@ -69,10 +81,11 @@ export default defineConfig({
|
|
|
69
81
|
|
|
70
82
|
## roadmap
|
|
71
83
|
|
|
72
|
-
- feat: generate mf-manifest.json
|
|
73
|
-
- feat: support chrome plugin
|
|
84
|
+
- ✅ ~~feat: generate mf-manifest.json~~
|
|
85
|
+
- ✅ ~~feat: support chrome plugin~~
|
|
74
86
|
|
|
75
87
|
* ✅ ~~feat: support runtime plugins~~
|
|
88
|
+
* feat: nuxt ssr
|
|
76
89
|
|
|
77
90
|
- feat: download remote d.ts
|
|
78
91
|
- feat: generate d.ts
|