We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ef21d2 commit e602d82Copy full SHA for e602d82
.changeset/flat-olives-check.md
@@ -0,0 +1,5 @@
1
+---
2
+'@module-federation/modern-js': patch
3
4
+
5
+fix: enable SSR by utilizing pluginOptions and configuration adjustments for improved accuracy
packages/modernjs/src/cli/ssrPlugin.ts
@@ -24,9 +24,12 @@ export const moduleFederationSSRPlugin = (
24
],
25
setup: async (api) => {
26
const modernjsConfig = api.getConfig();
27
- const enableSSR = Boolean(modernjsConfig?.server?.ssr);
28
- if (!enableSSR || pluginOptions.userConfig?.ssr === false) {
29
- return {} as any;
+ const enableSSR =
+ pluginOptions.userConfig?.ssr === false
+ ? false
30
+ : Boolean(modernjsConfig?.server?.ssr);
31
+ if (!enableSSR) {
32
+ return;
33
}
34
35
setEnv();
0 commit comments