Build-time artifact generation for Next.js + Vercel
@todo
yarn add next-artifact
package.json
{
"scripts": {
"build": "next build && artifacts cache",
}
}
@todo
pages/api/endpoint.js
import artifact from "next-artifact"
export default async (req, res) => {
...
}