I have a small Next.js project, all the data comes from multiple API endpoints that look like this:
https://enpoint.com/some-query/project1
The API is projected in a way that it could reply with different data for different sites:
https://enpoint.com/some-query/project1
https://enpoint.com/some-query/project2
https://enpoint.com/some-query/project3
Right now I'm doing next build && next export as all I need is a static export. Once I run this command I'm getting /out/project1 with all the files necessary to run the site.
My question is - what's the preferred way of altering Next.js build process so during next build && next export it will run API calls to https://enpoint.com/some-query/project1, build out/project1 and then repeat the same steps for project2 and project3?
Once I build my project I want to end up with:
/out/project1
/out/project2
/out/project3
Any ideas? I've been looking in the docs but with no luck.