Overview

Monorepo Setup

If you have a monorepo, or a project located in a subdirectory relative to your GitHub repository, use the root property in your val.config.ts file.

Example configuration

import { initVal } from '@valbuild/next';

const { s, c, val, config, nextAppRouter } = initVal({
  root: '/web', // <- add this for monorepo
  project: 'valbuild/example',
  gitBranch: process.env.VERCEL_GIT_COMMIT_REF,
  gitCommit: process.env.VERCEL_GIT_COMMIT_SHA,
  defaultTheme: 'dark',
});

export type { t } from '@valbuild/next';
export { s, c, val, config, nextAppRouter };

The root property should be the path from your repository root to your project directory. For example, if your project is in a /web folder in your repository, set root: '/web'.