Skip to content

Commit d636028

Browse files
async startup
1 parent b4f78b4 commit d636028

File tree

9 files changed

+19898
-14366
lines changed

9 files changed

+19898
-14366
lines changed

comprehensive-demo-react18/app-01/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"react-dom": "18.3.1",
1818
"react-router-dom": "^5.1.2",
1919
"serve": "^14.2.1",
20-
"webpack": "5.92.1",
20+
"webpack": "git+https://github.com/ScriptedAlchemy/webpack.git#mf-chunk-startup",
2121
"webpack-cli": "^5.1.4"
2222
},
2323
"scripts": {
@@ -33,6 +33,7 @@
3333
"devDependencies": {
3434
"@module-federation/enhanced": "0.2.5",
3535
"@module-federation/runtime": "0.2.5",
36+
"@module-federation/manifest": "0.2.5",
3637
"@module-federation/sdk": "0.2.5",
3738
"@pmmmwh/react-refresh-webpack-plugin": "0.5.15",
3839
"@rspack/plugin-react-refresh": "0.7.5",

comprehensive-demo-react18/app-01/webpack.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const HtmlWebpackPlugin = require('html-webpack-plugin');
2+
const StartupChunkDependenciesPlugin = require("webpack/lib/runtime/MfStartupChunkDependenciesPlugin");
23
const { ModuleFederationPlugin } = require('@module-federation/enhanced');
34
const { RsdoctorWebpackPlugin } = require('@rsdoctor/webpack-plugin');
45
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
@@ -95,6 +96,9 @@ module.exports = {
9596
},
9697
},
9798
}),
99+
new StartupChunkDependenciesPlugin({
100+
asyncChunkLoading: true
101+
}),
98102
new HtmlWebpackPlugin({
99103
template: './public/index.html',
100104
}),

0 commit comments

Comments
 (0)