saltyshiomix / nextron

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

Is there an example of next js app router ? I tried ,but failed. #475

Open imtiger opened 2 months ago

imtiger commented 2 months ago

the default created project using the page router,but I want to using the app router ,how can id do it? Is there an examerple for the next js app router?

saltyshiomix commented 2 months ago

Hi, @imtiger

Electron can handle only static files in production mode, so nextron needs to run the command next export(currently next build with { output: 'export' } in next.config.js).

You can use app router as long as you can export static files, otherwise it is not supported. So we don't have examples of app router 🙇

dlt1111 commented 2 months ago

@imtiger i guess u want to use the app router mode of nextjs. u can adjust your structure of renderer directory by urself, according to app router mode. like this image cc @saltyshiomix

imtiger commented 2 months ago

@imtiger i guess u want to use the app router mode of nextjs. u can adjust your structure of renderer directory by urself, according to app router mode. like this image cc @saltyshiomix

thanks,I have make it work using app router