Next.js Discord

Discord Forum

How to pass custom arg to "next build" CLI command

Unanswered
American black bear posted this in #help-forum
Open in Discord
American black bearOP
I want to pass the latest git tag to my application at build time.

next build --NEXT_PUBLIC_APP_VERSION=123


I get the following error

Unknown or unexpected option: --NEXT_PUBLIC_APP_VERSION

Does nextjs support this ? How can i pass custom build args

4 Replies