Skip to content

Disable SSR for the renderer app shell#1278

Open
Noshkas wants to merge 2 commits into
wulkano:mainfrom
Noshkas:issuehunt/disable-next-ssr
Open

Disable SSR for the renderer app shell#1278
Noshkas wants to merge 2 commits into
wulkano:mainfrom
Noshkas:issuehunt/disable-next-ssr

Conversation

@Noshkas
Copy link
Copy Markdown

@Noshkas Noshkas commented May 12, 2026

Fixes #515

Summary

  • Move the Electron-dependent app wrapper out of _app into a client-only app shell loaded with next/dynamic({ssr: false}).
  • Remove the mounted-state workaround from _app, so Next handles skipping server rendering directly.
  • Scope the custom electron-renderer webpack target to the client build only; the server/export build keeps the normal Node target and can evaluate dynamic imports without requiring window.
  • Update CircleCI to a currently supported macOS image while keeping Kap on Node 16 for the existing dependency graph.

Verification

  • npx -p node@16 -c 'node ./node_modules/.bin/xo' passed with existing warnings only.
  • npx -p node@16 -c 'node ./node_modules/typescript/bin/tsc --noEmit -p tsconfig.json'
  • npx tsc --noEmit -p renderer/tsconfig.json
  • npx -p node@16 -c 'node ./node_modules/next/dist/bin/next build renderer && node ./node_modules/next/dist/bin/next export renderer'
  • Checked exported renderer HTML, e.g. renderer/out/editor.html, renders an empty #__next shell rather than server-rendering the Electron UI.
  • CircleCI build passed on this PR after the CI image update.

Note: I installed dependencies locally with yarn install --frozen-lockfile --ignore-scripts --ignore-engines because this older lockfile rejects modern Node during the engine check, then ran node node_modules/electron/install.js so the renderer build could import Electron during page-data collection.

@Noshkas Noshkas force-pushed the issuehunt/disable-next-ssr branch from c4c80a2 to 087a354 Compare May 12, 2026 17:15
@Noshkas Noshkas force-pushed the issuehunt/disable-next-ssr branch from 087a354 to 89081e9 Compare May 12, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disable Next.js SSR

2 participants