{"id":13517127,"url":"https://github.com/leo/electron-next","last_synced_at":"2025-05-16T07:04:39.426Z","repository":{"id":57221754,"uuid":"87635051","full_name":"leo/electron-next","owner":"leo","description":"Build Electron apps using Next.js","archived":false,"fork":false,"pushed_at":"2023-05-28T13:46:56.000Z","size":96,"stargazers_count":550,"open_issues_count":16,"forks_count":41,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-10T01:06:48.993Z","etag":null,"topics":["electron","main","next","renderer"],"latest_commit_sha":null,"homepage":"https://github.com/leo/site/blob/beef3a7dc1dfd435a9d8377e3b1b59761ccb7fc7/pages/2017/electron-next.js","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leo.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-04-08T13:16:11.000Z","updated_at":"2025-03-20T03:31:00.000Z","dependencies_parsed_at":"2024-01-13T10:41:59.527Z","dependency_job_id":"d2c70143-2c9e-4539-a6e1-901e68a98859","html_url":"https://github.com/leo/electron-next","commit_stats":{"total_commits":91,"total_committers":5,"mean_commits":18.2,"dds":0.04395604395604391,"last_synced_commit":"82346f0ea116882ab7dbc440998cd1d021cdc1ee"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leo%2Felectron-next","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leo%2Felectron-next/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leo%2Felectron-next/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leo%2Felectron-next/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leo","download_url":"https://codeload.github.com/leo/electron-next/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254485055,"owners_count":22078767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["electron","main","next","renderer"],"created_at":"2024-08-01T05:01:30.161Z","updated_at":"2025-05-16T07:04:39.331Z","avatar_url":"https://github.com/leo.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# electron-next\n\n[![Build Status](https://travis-ci.org/leo/electron-next.svg?branch=master)](https://travis-ci.org/leo/electron-next)\n[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)\n\nThis package lets you use [Next.js](https://github.com/zeit/next.js) for building the renderer of your [Electron](https://electron.atom.io) apps!\n\n- 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`)\n- While **developing**, it takes care of the whole flow required for building the renderer code\n\n## Usage\n\nFirstly, install the package using any node package manager:\n\n```bash\nyarn add electron-next\n```\n\nThen load it:\n\n```js\nconst prepareRenderer = require('electron-next')\n```\n\nAs the final step, call the package:\n\n- `\u003cpath\u003e`: 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).\n- `\u003cport\u003e`: Used for running [Next.js](https://github.com/zeit/next.js) in development (number, **optional**, defaults to `8000`).\n\n```js\nawait prepareRenderer(\u003cpath\u003e, \u003cport\u003e)\n```\n\n## Caught a Bug?\n\n1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device\n2. Link the package to the global package directory: `npm link`\n3. Within the electron app of your choice, link it to the dependencies: `npm link electron-next`. Instead of the default one from [npm](https://www.npmjs.com), it will now use your local clone of the package!\n\n## Author\n\n- Leo Lamprecht ([@notquiteleo](https://twitter.com/notquiteleo))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleo%2Felectron-next","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleo%2Felectron-next","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleo%2Felectron-next/lists"}