Build Settings

Learn how to configure the Build & Development settings for your Vercel Deploy Button.
Table of Contents
ParameterTypeDescription
build-commandstringSetting this value is equivalent to enabling the Override toggle for that field in the dashboard.

This allows you to define a custom Build command that is normally automatically configured based on your Project's framework.

The example below shows a source URL using the build-command parameter to set the Build command to npm run build:

source url
https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fnext.js%2Ftree%2Fcanary%2Fexamples%2Fhello-world&build-command=npm%20run%20build
ParameterTypeDescription
install-commandstringSetting this value is equivalent to enabling the Override toggle for that field in the dashboard.

This allows you to define a custom Install command that is normally automatically configured based on the following:

Lock FileInstall CommandPackage Manager Version
pnpm-lock.yamlpnpm installpnpm 7 if "lockfileVersion": 5.4, otherwise pnpm 6
package-lock.jsonnpm installnpm 8 if "lockfileVersion": 2, otherwise npm 6
bun.lockbbun installbun 1
Noneyarn installN/A

The example below shows a source URL using the install-command parameter to set the Install command to npm install:

source url
https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fnext.js%2Ftree%2Fcanary%2Fexamples%2Fhello-world&install-command=npm%20install
ParameterTypeDescription
dev-commandstringSetting this value is equivalent to enabling the Override toggle for that field in the dashboard.

This allows you to define a custom development command if you are using vercel dev to test your project locally. Each framework has its own development command and this will be set automatically based on your selected framework.

The example below shows a source URL using the dev-command parameter to set the Development command to next dev --port $PORT:

source url
https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fnext.js%2Ftree%2Fcanary%2Fexamples%2Fhello-world&dev-command=next%20dev%20--port%20%24PORT
ParameterTypeDescription
ignore-commandstringSetting this value is equivalent to enabling the Override toggle for that field in the dashboard.

This allows you to define an Ignored Build Step to determine when your project should build and deploy.

The example below shows a source URL using the ignore-command parameter to set the Ignored Build Step command to npx turbo-ignore:

source url
https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fnext.js%2Ftree%2Fcanary%2Fexamples%2Fhello-world&ignore-command=npx%20turbo-ignore
ParameterTypeDescription
root-directorystringSetting this value is equivalent to enabling the Override toggle for that field in the dashboard.

This allows you to define the path of the directory relative to the root of the Project folder where your source code is located. By default it is empty and equivalent to the root of the repository.

The example below shows a source URL using the root-directory parameter to set the Root Directory to apps/frontend:

source url
https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel-support%2Fyarn-ws-monorepo&root-directory=apps%2Ffrontend
ParameterTypeDescription
output-directorystringSetting this value is equivalent to enabling the Override toggle for that field in the dashboard.

This allows you to define the output directory's path relative to the Project folder's root. Usually, this is automatically configured based on your Project's framework.

The example below shows a source URL using the output-directory parameter for a monorepo where the application output is generated to dist/apps/app/.next:

source url
https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fnext.js%2Ftree%2Fcanary%2Fexamples%2Fhello-world&output-directory=dist%2Fapps%2Fapp%2F.next
Last updated on October 6, 2024