Configuration

transpilePackages

Ask the build to transpile and bundle named dependencies, including workspace packages. It does not install missing packages or make incompatible browser/server imports safe. Select the smallest necessary set and verify production builds and package exports. Example context: Next.js 16.x documentation lane; illustrative snippet or file tree, not executed. Exact candidate patch 16.4.6 remains unverified. Expected behavior / verification: Build the fixture with the actual workspace package and verify its component renders. A missing package should still fail rather than be silently downloaded.

Formal Syntax & Structure

nextjs syntaxnextjs
transpilePackages: string[]

Working Example

Example Snippetnextjs
// next.config.ts — assumes reviewed @river/ui workspace packageimport type { NextConfig } from 'next';const config: NextConfig = { transpilePackages: ['@river/ui'] };export default config;
Next.js Reference