package
Build Electron apps using Next.js
npm install electron-nextGitHub-flavored package documentation.
Across all versions, last 30 days.
32,052 in 30 days
Runtime metadata.
Tagged topics.
This package lets you use Next.js for building the renderer of your Electron apps!
file:// protocol (which Electron uses to load your static assets in the renderer process) works properly with your Next.js bundle (generated by next export)Firstly, install the package using any node package manager:
yarn add electron-nextThen load it:
const prepareRenderer = require('electron-next')As the final step, call the package:
<path>: The path to the directory containing the renderer (relative to the app's root directory). If the paths for development and production aren't the same, this can be an object holding a development and a production key with their respective paths (string|object).<port>: Used for running Next.js in development (number, optional, defaults to 8000).await prepareRenderer(<path>, <port>)npm linknpm link electron-next. Instead of the default one from npm, it will now use your local clone of the package!Estimated unpacked size across 3 packages.
25.2 kB
Includes dependencies.