Joren
Joren

Reputation: 9915

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

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.

Upvotes: 6

Views: 10346

Answers (1)

Eric Burel
Eric Burel

Reputation: 4924

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.

Upvotes: 7

Related Questions