leo / electron-next

Build Electron apps using Next.js
https://github.com/leo/site/blob/beef3a7dc1dfd435a9d8377e3b1b59761ccb7fc7/pages/2017/electron-next.js
MIT License
545 stars 41 forks source link
electron main next renderer

electron-next

Build Status XO code style

This package lets you use Next.js for building the renderer of your Electron apps!

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:

await prepareRenderer(<path>, <port>)

Caught a Bug?

  1. Fork this repository to your own GitHub account and then clone it to your local device
  2. Link the package to the global package directory: npm link
  3. 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