Fix SSR: align @modern-js/runtime to v2.70.8 and re-enable stream SSR

The server build was failing with "window is not defined" during SSR because
@modern-js/runtime@3.1.3 had an SSR-unsafe window reference in its router
plugin. Pinning runtime to 2.70.8 (matching app-tools) resolves the version
mismatch and eliminates the server-side window access.
This commit is contained in:
2026-04-15 16:16:28 +03:00
parent 1facfd8050
commit aae632c742
3 changed files with 236 additions and 280 deletions
+5 -1
View File
@@ -12,7 +12,11 @@ export default defineConfig({
runtime: {
router: true,
},
server: {}, // SSR disabled temporarily to debug client-side rendering
server: {
ssr: {
mode: "stream",
},
},
output: {
distPath: { root: isRemote ? "dist/remote" : "dist/standalone" },
},
+1 -1
View File
@@ -23,7 +23,7 @@
"dependencies": {
"@microsoft/signalr": "^10.0.0",
"@modern-js/app-tools": "2.70.8",
"@modern-js/runtime": "^3.1.3",
"@modern-js/runtime": "2.70.8",
"@module-federation/enhanced": "2.3.2",
"@module-federation/modern-js": "2.3.2",
"@opentelemetry/api": "^1.9.1",
+230 -278
View File
File diff suppressed because it is too large Load Diff