withBuildNotifier

next-build-notifier · /index·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

@nordcom/commerce-next-build-notifier
function withBuildNotifier(nextConfig: NextConfig, options: WithBuildNotifierOptions): NextConfig;

Parameters

NameTypeDescription
nextConfigNextConfig
optionsWithBuildNotifierOptions

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);

WithBuildNotifierOptions BuildNotificationState BuildNotifierConfig BuildNotifierProps BuildNotifierProviderProps VersionResponse BuildNotifier BuildNotifierProvider

Sourceconfig.ts:44Edit the JSDoc directly
Metadata@nordcom/commerce-next-build-notifier@0.2.2Open in GitHub ↗

On this page