Skip to content

Commit e787fd3

Browse files
fix(rspress-plugin): set config.ssg.experimentalWorker true if enable ssg-md (module-federation#4430)
Co-authored-by: Zack Jackson <25274700+ScriptedAlchemy@users.noreply.github.com>
1 parent 6235711 commit e787fd3

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

.changeset/thick-poems-fetch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/rspress-plugin': patch
3+
---
4+
5+
fix(rspress-plugin): set config.ssg.experimentalWorker true if enable ssg-md

packages/rspress-plugin/src/plugin.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,15 @@ export function pluginModuleFederation(
6666
async config(config) {
6767
if (!isDev() && config.ssg !== false) {
6868
enableSSG = true;
69+
if (config.llms) {
70+
logger.info(
71+
'Detect you set "llms: true", enable experimentalWorker for ssg to enable parallel build',
72+
);
73+
config.ssg = {
74+
...(typeof config.ssg === 'object' ? config.ssg : {}),
75+
experimentalWorker: true,
76+
};
77+
}
6978
}
7079

7180
// config.builderConfig ||= {};

0 commit comments

Comments
 (0)