electron-next | Build Electron apps using Next.js | Dektop Application library
kandi X-RAY | electron-next Summary
kandi X-RAY | electron-next Summary
Build Electron apps using Next.js
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of electron-next
electron-next Key Features
electron-next Examples and Code Snippets
Community Discussions
Trending Discussions on electron-next
QUESTION
I'm building an electron app using Next.js and electron-next package so Electron can handle the "ouput" folder from Next.js. The app works great (simple html "hello world" test for all) for development; however, when I'm packaging the app with electron-builder, the page doesn't load and the DevTools is saying that it cannot load local files. I can see the files generated by electron-builder and nowhere I can find the static html files. Is there something I'm missing? Are the static files are included in the *.asar file?
This is for Electron under Windows 10. Below I'm showing the package.json file setup for electron-builder, as well as the call to open the initial HTML file on the app entry file (index.js)
...ANSWER
Answered 2019-Jul-22 at 16:42I found from another post that you can also do this (using app.getAppPath()):
QUESTION
I'm trying to use Next to power an Electron app. electron-next uses Next's static site mode for its production build, which calls getInitialProps
at build-time, rather than launch-time.
start.js (initially rendered page)
...ANSWER
Answered 2019-Apr-03 at 22:00I ended up not using getInitialProps
at all. Instead, I'm using a React hook. It works basically like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install electron-next
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page