Generate build files compatible with Vercel using Build Output API
This script should run after the Nullstack produces it's normal builds, for example:
"scripts": {
"build": "nullstack build",
"vercel-build": "npm run build && npx nullstack-adapt-vercel"
}
Then it will generate the .vercel/output folder using .production and public accordingly to Vercel Build Output API allowing to deploy seamlessly (e.g. running vercel
from Vercel CLI)
- It only does anything when
process.env.VERCEL
is truthy - Takes inspiration from @sveltejs/adapter-vercel
💡
vercel-build
is the default script that Vercel itself runs when deploying, perfect to execute a script like this only there 🚀