Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@guildplanner.pro/electron-next

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@guildplanner.pro/electron-next

Build Electron apps using Next.js

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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 by next export).
  • While developing, it takes care of the whole flow required for building the renderer code.

Usage

  1. Install: npm i @guildplanner.pro/electron-next

  2. In Main code of your Electron app:

    import prepareRenderer from '@guildplanner.pro/electron-next';
    
    app.on('ready', async () => {
         // ...
         await prepareRenderer('./renderer');
         // ...
    });
    
  3. 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 for development and production aren't the same, this can be an object holding a development and a production key with their respective paths.
  • <port> (number, optional, defaults to 8000): Used for running Next.js in development.

Keywords

FAQs

Package last updated on 01 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc