Add post-build script to next.js on Vercel?

Viewed 2981

Is this supported somehow? I'd like to execute arbitrary code to post-process the built HTML/css/etc after next.js does its thing.

1 Answers

You can use a custom build command in Vercel, that does both the build and the postbuild: yarn run build && yarn run your-postbuild-script.

Documentation here.

Related