@signapps/next-config
A small shared Next.js config helper for the monorepo. It resolves the Turbopack root and wires up transpilation of workspace packages so Next.js builds correctly in a pnpm workspace.
- Workspace:
packages/next-config - No build output — imported as TypeScript source in each app's
next.config.ts.
Why it exists
In a pnpm + Turborepo setup, Next.js / Turbopack needs a consistent root to
trace files and resolve hoisted/symlinked node_modules. Workspace packages
(@signapps/ui, @signapps/api-client, …) are consumed as source, so they must
be listed in transpilePackages for Next to recompile them.
API
import { createNextAppConfig } from '@signapps/next-config';
export default createNextAppConfig(
import.meta.dirname,
{
// your NextConfig overrides
},
{
transpilePackages: ['@signapps/ui', '@signapps/api-client', '@signapps/types'],
},
);
resolveTurbopackRoot(appDir)— walks up from the app dir to the monorepo root.createNextAppConfig(appDir, config, options)— merges yourNextConfigwith the workspacetranspilePackages, setsoutputFileTracingRoot(prod) andturbopack.root(dev) to the resolved root.
Consumed by
Web admin (and any other Next.js app in the repo).