@module-federation/rspress-plugin 2.0.1 → 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.
Files changed (2) hide show
  1. package/dist/index.js +10 -2
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -196,12 +196,20 @@ function plugin_pluginModuleFederation(mfConfig, rspressOptions) {
196
196
  return {
197
197
  name: 'plugin-module-federation',
198
198
  async config (config) {
199
- if (!isDev() && false !== config.ssg) enableSSG = true;
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
+ }
200
209
  config.builderConfig ||= {};
201
210
  config.builderConfig.plugins ||= [];
202
211
  config.builderConfig.plugins.push(pluginModuleFederation(mfConfig, {
203
212
  target: enableSSG ? 'dual' : 'web',
204
- environment: 'node',
205
213
  ssrDir: 'mf-ssg'
206
214
  }));
207
215
  return config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/rspress-plugin",
3
- "version": "2.0.1",
3
+ "version": "2.1.0",
4
4
  "type": "module",
5
5
  "description": "Module Federation plugin for Rspress",
6
6
  "keywords": [
@@ -42,10 +42,10 @@
42
42
  "html-to-text": "^9.0.5",
43
43
  "lodash-es": "^4.17.21",
44
44
  "@rspress/shared": "2.0.3",
45
- "@module-federation/rsbuild-plugin": "2.0.1",
46
- "@module-federation/enhanced": "2.0.1",
47
- "@module-federation/sdk": "2.0.1",
48
- "@module-federation/error-codes": "2.0.1"
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
51
  "@rspress/core": "^2.0.3"