@module-federation/rspress-plugin 2.0.0 → 2.1.0
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/dist/index.js +14 -2
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -182,6 +182,10 @@ function plugin_pluginModuleFederation(mfConfig, rspressOptions) {
|
|
|
182
182
|
singleton: true,
|
|
183
183
|
requiredVersion: false
|
|
184
184
|
},
|
|
185
|
+
'react-router-dom': {
|
|
186
|
+
singleton: true,
|
|
187
|
+
requiredVersion: false
|
|
188
|
+
},
|
|
185
189
|
...mfConfig.shared
|
|
186
190
|
};
|
|
187
191
|
mfConfig.experiments ||= {};
|
|
@@ -192,12 +196,20 @@ function plugin_pluginModuleFederation(mfConfig, rspressOptions) {
|
|
|
192
196
|
return {
|
|
193
197
|
name: 'plugin-module-federation',
|
|
194
198
|
async config (config) {
|
|
195
|
-
if (!isDev() && false !== config.ssg)
|
|
199
|
+
if (!isDev() && false !== config.ssg) {
|
|
200
|
+
enableSSG = true;
|
|
201
|
+
if (config.llms) {
|
|
202
|
+
src_logger.info('Detect you set "llms: true", enable experimentalWorker for ssg to enable parallel build');
|
|
203
|
+
config.ssg = {
|
|
204
|
+
...'object' == typeof config.ssg ? config.ssg : {},
|
|
205
|
+
experimentalWorker: true
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
}
|
|
196
209
|
config.builderConfig ||= {};
|
|
197
210
|
config.builderConfig.plugins ||= [];
|
|
198
211
|
config.builderConfig.plugins.push(pluginModuleFederation(mfConfig, {
|
|
199
212
|
target: enableSSG ? 'dual' : 'web',
|
|
200
|
-
environment: 'node',
|
|
201
213
|
ssrDir: 'mf-ssg'
|
|
202
214
|
}));
|
|
203
215
|
return config;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/rspress-plugin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Module Federation plugin for Rspress",
|
|
6
6
|
"keywords": [
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"types": "./dist/plugin.d.ts",
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@rslib/core": "^0.9.2",
|
|
34
|
-
"@rspress/core": "2.0.
|
|
34
|
+
"@rspress/core": "2.0.3",
|
|
35
35
|
"@types/html-to-text": "^9.0.4",
|
|
36
36
|
"@types/lodash-es": "^4.17.12",
|
|
37
37
|
"@types/react": "^18.3.11"
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"fs-extra": "11.3.0",
|
|
42
42
|
"html-to-text": "^9.0.5",
|
|
43
43
|
"lodash-es": "^4.17.21",
|
|
44
|
-
"@rspress/shared": "2.0.
|
|
45
|
-
"@module-federation/sdk": "2.
|
|
46
|
-
"@module-federation/
|
|
47
|
-
"@module-federation/
|
|
48
|
-
"@module-federation/
|
|
44
|
+
"@rspress/shared": "2.0.3",
|
|
45
|
+
"@module-federation/sdk": "2.1.0",
|
|
46
|
+
"@module-federation/rsbuild-plugin": "2.1.0",
|
|
47
|
+
"@module-federation/enhanced": "2.1.0",
|
|
48
|
+
"@module-federation/error-codes": "2.1.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@rspress/core": "^2.0.
|
|
51
|
+
"@rspress/core": "^2.0.3"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"build": "rslib build",
|