saltyshiomix / nextron

⚡ Next.js + Electron ⚡
https://npm.im/nextron
MIT License
3.69k stars 215 forks source link

Add existing Next.js project to Electron app? #257

Open hoangvu12 opened 2 years ago

hoangvu12 commented 2 years ago

Is there any way to add existing Next.js project to Electron App? I have a Next.js website project, now I'm planning to create an Electron app without using Webview to display the website the directly. I don't want to copy each file so a way like pull code from the website's repository would be awesome

m5x5 commented 2 years ago

Technically you should be able to just copy the whole Next.js project into the renderer/ folder. Or am I missing something?

hoangvu12 commented 2 years ago

Technically you should be able to just copy the whole Next.js project into the renderer/ folder. Or am I missing something?

if I can clone and pull the existing code from repo into /renderer would be awesome, I just don't want to manually change everything if I add/change something on that existing code.

m5x5 commented 2 years ago

I'm not quite sure how many people could use something like that. What do you think about writing a script in batch or with Node.js + fs that'll copy files over before you run the code?

hoangvu12 commented 2 years ago

I'm not quite sure how many people could use something like that. What do you think about writing a script in batch or with Node.js + fs that'll copy files over before you run the code?

I tried to manually copying the source code from my website and it didn't seem to run, looks like the errors are from webpack things

m5x5 commented 2 years ago

If you show them we can try to figure out what happens there.

chriszrc commented 1 year ago

Any updates on this...

filippozanfini commented 9 months ago

Any update on this?

sinameraji commented 2 months ago

Why cant Electron be added to an existing Next js project? that sounds like a trivial thing that should just work by default

aperekrestov commented 2 months ago

I have the same question

mahbd commented 1 month ago

It will be nice to be able to convert existing nextjs project to nextron project

ilyesBoukraa commented 4 weeks ago

any updates on thsi?