File tree Expand file tree Collapse file tree 14 files changed +169
-6
lines changed
comprehensive-demo-react18 Expand file tree Collapse file tree 14 files changed +169
-6
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ module.exports = {
2525 } ,
2626 experiments : {
2727 css : true ,
28+ mfAsyncStartup : true ,
2829 } ,
2930
3031 module : {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- import ( './bootstrap' ) ;
1+ import App from './App' ;
2+ import React from 'react' ;
3+ import ReactDOM from 'react-dom' ;
4+
5+ ReactDOM . render ( < App /> , document . getElementById ( 'root' ) ) ;
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ module.exports = {
6969 new ModuleFederationPlugin ( {
7070 name : 'app_01' ,
7171 filename : 'remoteEntry.js' ,
72+ experiments : { asyncStartup : true } ,
7273 remotes : {
7374 app_02 : 'app_02@http://localhost:3002/remoteEntry.js' ,
7475 app_03 : 'app_03@http://localhost:3003/remoteEntry.js' ,
Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ module.exports = {
1818 optimization : {
1919 minimize : false ,
2020 } ,
21+ experiments : {
22+ css : true ,
23+ mfAsyncStartup : true ,
24+ } ,
2125 devServer : {
2226 port : 3002 ,
2327 hot : true ,
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ module.exports = {
6565 new ModuleFederationPlugin ( {
6666 name : 'app_02' ,
6767 filename : 'remoteEntry.js' ,
68+ experiments : { asyncStartup : true } ,
6869 remotes : {
6970 app_01 : 'app_01@http://localhost:3001/remoteEntry.js' ,
7071 app_03 : 'app_03@http://localhost:3003/remoteEntry.js' ,
Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ module.exports = {
2929 publicPath : 'auto' ,
3030 uniqueName : 'app3' ,
3131 } ,
32+ experiments : {
33+ css : true ,
34+ mfAsyncStartup : true ,
35+ } ,
3236
3337 module : {
3438 rules : [
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ module.exports = {
5959 new ModuleFederationPlugin ( {
6060 name : 'app_03' ,
6161 filename : 'remoteEntry.js' ,
62+ experiments : { asyncStartup : true } ,
6263 remotes : {
6364 app_01 : 'app_01@http://localhost:3001/remoteEntry.js' ,
6465 } ,
Original file line number Diff line number Diff line change 1+ {
2+ "id" : " app_04" ,
3+ "name" : " app_04" ,
4+ "metaData" : {
5+ "name" : " app_04" ,
6+ "type" : " app" ,
7+ "buildInfo" : {
8+ "buildVersion" : " 1.0.0" ,
9+ "buildName" : " comprehensive-demo-react18_app-04"
10+ },
11+ "remoteEntry" : {
12+ "name" : " remoteEntry.js" ,
13+ "path" : " " ,
14+ "type" : " global"
15+ },
16+ "types" : {
17+ "path" : " " ,
18+ "name" : " " ,
19+ "zip" : " " ,
20+ "api" : " "
21+ },
22+ "globalName" : " app_04" ,
23+ "pluginVersion" : " 0.17.1" ,
24+ "prefetchInterface" : false ,
25+ "publicPath" : " auto"
26+ },
27+ "shared" : [],
28+ "remotes" : [],
29+ "exposes" : [
30+ {
31+ "id" : " app_04:App" ,
32+ "name" : " App" ,
33+ "assets" : {
34+ "js" : {
35+ "sync" : [
36+ " 875.875.js" ,
37+ " __federation_expose_App.874.js"
38+ ],
39+ "async" : []
40+ },
41+ "css" : {
42+ "sync" : [
43+ " __federation_expose_App.874.css"
44+ ],
45+ "async" : []
46+ }
47+ },
48+ "path" : " ./App"
49+ },
50+ {
51+ "id" : " app_04:loadApp" ,
52+ "name" : " loadApp" ,
53+ "assets" : {
54+ "js" : {
55+ "sync" : [
56+ " 875.875.js" ,
57+ " __federation_expose_loadApp.474.js"
58+ ],
59+ "async" : []
60+ },
61+ "css" : {
62+ "sync" : [
63+ " __federation_expose_loadApp.474.css"
64+ ],
65+ "async" : []
66+ }
67+ },
68+ "path" : " ./loadApp"
69+ }
70+ ]
71+ }
Original file line number Diff line number Diff line change 1+ {
2+ "id" : " app_04" ,
3+ "name" : " app_04" ,
4+ "metaData" : {
5+ "name" : " app_04" ,
6+ "type" : " app" ,
7+ "buildInfo" : {
8+ "buildVersion" : " 1.0.0" ,
9+ "buildName" : " comprehensive-demo-react18_app-04"
10+ },
11+ "remoteEntry" : {
12+ "name" : " remoteEntry.js" ,
13+ "path" : " " ,
14+ "type" : " global"
15+ },
16+ "types" : {
17+ "path" : " " ,
18+ "name" : " " ,
19+ "zip" : " " ,
20+ "api" : " "
21+ },
22+ "globalName" : " app_04" ,
23+ "pluginVersion" : " 0.17.1" ,
24+ "prefetchInterface" : false ,
25+ "publicPath" : " auto"
26+ },
27+ "shared" : [],
28+ "remotes" : [],
29+ "exposes" : [
30+ {
31+ "path" : " ./App" ,
32+ "id" : " app_04:App" ,
33+ "name" : " App" ,
34+ "requires" : [],
35+ "file" : " src/main.js" ,
36+ "assets" : {
37+ "js" : {
38+ "sync" : [
39+ " 875.875.js" ,
40+ " __federation_expose_App.874.js"
41+ ],
42+ "async" : []
43+ },
44+ "css" : {
45+ "sync" : [
46+ " __federation_expose_App.874.css"
47+ ],
48+ "async" : []
49+ }
50+ }
51+ },
52+ {
53+ "path" : " ./loadApp" ,
54+ "id" : " app_04:loadApp" ,
55+ "name" : " loadApp" ,
56+ "requires" : [],
57+ "file" : " src/loadApp.js" ,
58+ "assets" : {
59+ "js" : {
60+ "sync" : [
61+ " 875.875.js" ,
62+ " __federation_expose_loadApp.474.js"
63+ ],
64+ "async" : []
65+ },
66+ "css" : {
67+ "sync" : [
68+ " __federation_expose_loadApp.474.css"
69+ ],
70+ "async" : []
71+ }
72+ }
73+ }
74+ ]
75+ }
You can’t perform that action at this time.
0 commit comments