I’m trying to run a build for both nextjs and my api server. Because the nextjs build relies on ‘next-on-netlify’ and my api relies on a lambda functiont, if I try to put them both in one command it will either build nextjs and then not build the api or if I try to put them both it one command with npm-run-all it then doesn’t build correctly as the postBuild next-on-netlify doesn’t build the files.
How can I run both my nextjs build and api build in the same command?
“scripts”: {
“dev”: “next dev”
“build”: “next build”,
“start”: “next build”,
“postbuild”: “next-on-netlify”,
“buildApi”: “./node_modules/.bin/netlify-lambda build src”
},