Can i use a custom server with static optimization provided by Next.js?
I know that documentation has an info explaining that is not possible, but is there a workaround to do this?
You could use something like https://medium.com/@igordata/how-to-cache-all-pages-in-next-js-at-server-side-1850aace87dc - This uses a npm module on top of nextjs generated pages.
I would be interested on your usecase, if SSG is important, why use a custom server?