1.0.3 • Published 1 year ago
@guildplanner.pro/electron-next v1.0.3
electron-next
Originally created by Leo Lamprecht, forked from v3.1.4.
This package lets you use Next.js for building the renderer of your Electron apps!
- In production, it ensures that the
file://
protocol (which Electron uses to load your static assets in the renderer process) works properly with your Next.js bundle (generated bynext export
). - While developing, it takes care of the whole flow required for building the renderer code.
Usage
Install:
npm i @guildplanner.pro/electron-next
In Main code of your Electron app:
import prepareRenderer from '@guildplanner.pro/electron-next'; app.on('ready', async () => { // ... await prepareRenderer('./renderer'); // ... });
See Next.js example.
Parameters
await prepareRenderer(<path>, <port>)
<path>
(string|object
): The path to the directory containing the renderer (relative to the app's root directory). If the paths fordevelopment
andproduction
aren't the same, this can be an object holding a development and a production key with their respective paths.<port>
(number
, optional, defaults to8000
): Used for running Next.js in development.
1.0.2
1 year ago
1.0.1
1 year ago
1.0.0
1 year ago
1.0.3
1 year ago
1.0.0-beta2
1 year ago
1.0.0-beta3
1 year ago
1.0.0-alpha16
1 year ago
1.0.0-alpha15
1 year ago
1.0.0-alpha14
1 year ago
1.0.0-alpha13
1 year ago
1.0.0-alpha12
1 year ago
1.0.0-alpha11
1 year ago
1.0.0-alpha10
1 year ago
1.0.0-alpha9
1 year ago
1.0.0-alpha8
1 year ago
1.0.0-alpha7
1 year ago
1.0.0-alpha6
1 year ago
1.0.0-alpha5
1 year ago
1.0.0-alpha4
1 year ago
1.0.0-alpha3
1 year ago
1.0.0-alpha2
1 year ago
1.0.0-alpha1
1 year ago