Skip to content

Commit 853a5e6

Browse files
chore: rspack direct
1 parent 1ed0fad commit 853a5e6

File tree

4 files changed

+811
-761
lines changed

4 files changed

+811
-761
lines changed

esm/host/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"react-dom": "^19.0.0"
1414
},
1515
"devDependencies": {
16-
"@module-federation/rsbuild-plugin": "^0.9.1",
16+
"@module-federation/rsbuild-plugin": "0.0.0-next-20250228220829",
1717
"@rsbuild/core": "^1.2.8",
1818
"@rsbuild/plugin-react": "^1.1.0"
1919
}

esm/remote/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
"type": "module",
66
"scripts": {
77
"build": "rsbuild build",
8-
"dev": "rsbuild dev --open",
8+
"dev": "rsbuild dev",
99
"preview": "rsbuild preview"
1010
},
1111
"dependencies": {
1212
"react": "^19.0.0",
1313
"react-dom": "^19.0.0"
1414
},
1515
"devDependencies": {
16-
"@module-federation/rsbuild-plugin": "^0.9.1",
16+
"@module-federation/rsbuild-plugin": "0.0.0-next-20250228220829",
1717
"@rsbuild/core": "^1.2.8",
1818
"@rsbuild/plugin-react": "^1.1.0"
1919
}

esm/remote/rsbuild.config.mjs

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,27 @@ export default defineConfig({
2929
module: true,
3030
asyncChunks: true
3131
},
32-
// optimization: {
33-
// runtimeChunk: 'single',
34-
// },
32+
optimization: {
33+
runtimeChunk: 'single',
34+
},
3535
},
3636
},
3737
plugins: [
3838
pluginReact({ splitChunks: { react: false, router: false } }),
39-
// pluginModuleFederation({
40-
// name: 'remote',
41-
// filename: 'static/remoteEntry.js',
42-
// library: {
43-
// type: 'module',
44-
// },
45-
// exposes: {
46-
// './App': './src/App.jsx',
47-
// },
48-
// shared: {
49-
// react: { singleton: true },
50-
// 'react-dom': { singleton: true },
51-
// },
52-
// }),
39+
pluginModuleFederation({
40+
name: 'remote',
41+
runtime: false,
42+
filename: 'static/remoteEntry.js',
43+
library: {
44+
type: 'module',
45+
},
46+
exposes: {
47+
'./App': './src/App.jsx',
48+
},
49+
shared: {
50+
react: { singleton: true },
51+
'react-dom': { singleton: true },
52+
},
53+
}),
5354
],
5455
});

0 commit comments

Comments
 (0)