3.1.5 • Published 6 years ago
electron-next v3.1.5
electron-next
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
Firstly, install the package using any node package manager:
yarn add electron-next
Then 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 adevelopment
and aproduction
key with their respective paths (string|object).<port>
: Used for running Next.js in development (number, optional, defaults to8000
).
await prepareRenderer(<path>, <port>)
Caught a Bug?
- Fork this repository to your own GitHub account and then clone it to your local device
- Link the package to the global package directory:
npm link
- Within the electron app of your choice, link it to the dependencies:
npm link electron-next
. Instead of the default one from npm, it will now use your local clone of the package!
Author
- Leo Lamprecht (@notquiteleo)
3.1.5
6 years ago
3.1.4
7 years ago
3.1.3
7 years ago
3.1.2
7 years ago
3.1.1
7 years ago
3.1.0
7 years ago
3.0.8
7 years ago
3.0.7
7 years ago
3.0.6
7 years ago
3.0.5
7 years ago
3.0.4
7 years ago
3.0.3
7 years ago
3.0.2
7 years ago
3.0.0
7 years ago
2.0.4
7 years ago
2.0.3
7 years ago
2.0.2
7 years ago
2.0.1
7 years ago
2.0.0
7 years ago
1.0.0
7 years ago
0.1.0
7 years ago