withBuildNotifier
●next-build-notifier · /config·function
Wraps a Next.js config so the running client knows its own build id: bakes NEXT_PUBLIC_BUILD_ID
(merged into env) and, by default, sets deploymentId to the same value so Next's native skew
handling and this notifier agree on one source of truth. Composes with an existing env and
generateBuildId.
Signature
function withBuildNotifier(nextConfig: NextConfig, options: WithBuildNotifierOptions): NextConfig;Parameters
| Name | Type | Description |
|---|---|---|
nextConfig | NextConfig | |
options | WithBuildNotifierOptions |
Returns
The wrapped Next.js config.
Example
// next.config.js
import { withBuildNotifier } from 'next-build-notifier/config';
/** @type {import('next').NextConfig} */
const config = { reactStrictMode: true };
export default withBuildNotifier(config);