nextjs-to-electronlisted
Install: claude install-skill rockbenben/aishort-skills
# Next.js → Electron Desktop App
## Overview
Wrap a **static-exportable** Next.js (App Router) app in a thin Electron shell. Electron bundles its own Chromium, so unlike Tauri it needs **no system WebView2** — the reason to pick it for locked-down/intranet machines. Keep the web behavior intact and put shell-specific behavior in `electron/`. Make the source or configuration changes required for a working export.
**Core principle:** Serve the export over a custom `app://` protocol, NOT `file://`. Almost all migration pain is path/origin resolution, not React — and `file://` silently breaks both. (See [electron-files.md](electron-files.md) for all copy-paste code.)
## When to use
- The app is (or can be) a **static export** (`output: "export"`) — diff/format/calculator/viewer tools, no SSR or API-at-runtime.
- **Export prerequisites**: `output: "export"` in `next.config.*`. The default `next/image` optimizer needs a server; use `images.unoptimized: true` for the offline template, or retain an export-compatible custom loader after verifying its network requirements.
- You want a Windows desktop build that runs **fully offline**, especially where WebView2 is absent (LTSC/Server images, air-gapped intranet) so Tauri won't launch.
**Check platform and toolchain compatibility.** Confirm the target Windows version and architecture against the selected Electron release. Use a supported stable Electron line and compatible builder/updater versions from the project's package source