File tree Expand file tree Collapse file tree 2 files changed +32
-31
lines changed
packages/plugin-module-federation Expand file tree Collapse file tree 2 files changed +32
-31
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,22 @@ export default defineConfig({
4343 'process.env.NODE_ENV' : JSON . stringify ( process . env . NODE_ENV ) ,
4444 } ,
4545 } ,
46+ plugins : [
47+ pluginModuleFederation ( {
48+ name : 'rslib_provider' ,
49+ exposes : {
50+ '.' : './src/index.tsx' ,
51+ } ,
52+ shared : {
53+ react : {
54+ singleton : true ,
55+ } ,
56+ 'react-dom' : {
57+ singleton : true ,
58+ } ,
59+ } ,
60+ } ) ,
61+ ] ,
4662 } ,
4763 ] ,
4864 plugins : [
@@ -51,19 +67,5 @@ export default defineConfig({
5167 react : false ,
5268 } ,
5369 } ) ,
54- pluginModuleFederation ( {
55- name : 'rslib_provider' ,
56- exposes : {
57- '.' : './src/index.tsx' ,
58- } ,
59- shared : {
60- react : {
61- singleton : true ,
62- } ,
63- 'react-dom' : {
64- singleton : true ,
65- } ,
66- } ,
67- } ) ,
6870 ] ,
6971} ) ;
Original file line number Diff line number Diff line change @@ -19,25 +19,24 @@ export default defineConfig({
1919 },
2020 assetPrefix: 'http://localhost:3001/mf',
2121 },
22+ plugins: [
23+ pluginModuleFederation({
24+ name: 'rslib_provider',
25+ exposes: {
26+ '.': './src/index.tsx',
27+ },
28+ shared: {
29+ react: {
30+ singleton: true,
31+ },
32+ 'react-dom': {
33+ singleton: true,
34+ },
35+ },
36+ }),
37+ ],
2238 },
2339 ],
24- plugins: [
25- // ...
26- pluginModuleFederation({
27- name: 'rslib_provider',
28- exposes: {
29- '.': './src/index.tsx',
30- },
31- shared: {
32- react: {
33- singleton: true,
34- },
35- 'react-dom': {
36- singleton: true,
37- },
38- },
39- }),
40- ],
4140});
4241
4342```
You can’t perform that action at this time.
0 commit comments