Back to Documentation
Deployment

Build Settings

Configure build commands, output directories, Node.js versions, and other build-time settings for your static sites.

1Auto-Detection

Berican Labs automatically detects your framework and configures build settings:

Framework Build Command Output
Next.js npm run build .next
React (CRA) npm run build build
Vue / Vite npm run build dist
Astro npm run build dist
Hugo hugo public

2Manual Configuration

Override settings in Dashboard > Site Settings > Build & Deploy:

  • Build Command: The command to build your project
  • Output Directory: Where your built files are located
  • Install Command: Command to install dependencies
  • Root Directory: Subdirectory containing your project

3berican.json

Configure builds using a berican.json file in your repository root:

{
  "buildCommand": "npm run build",
  "outputDirectory": "dist",
  "installCommand": "npm ci",
  "nodeVersion": "18",
  "framework": "vite",
  "regions": ["eu-west-1"]
}

This file takes precedence over dashboard settings.

4Node.js Version

Specify your Node.js version:

  • In berican.json: "nodeVersion": "18"
  • In .nvmrc: Just the version number (e.g., 18)
  • In package.json: "engines": { "node": ">=18" }

Supported versions: 16, 18, 20 (LTS versions recommended)

5Build Caching

Berican Labs automatically caches:

  • node_modules - Restored between builds
  • .next/cache - Next.js build cache
  • .cache - Gatsby cache

To clear the cache, go to Site Settings > Build & Deploy > Clear Build Cache.