Packages narrative
packages / next-build-notifier
next-build-notifier
Functions
| Name | Description |
|---|---|
withBuildNotifier | Wraps a Next.js config so the running client knows its own build id: bakes |
reload | Hard-reloads the document to fetch the new deployment's assets. SSR-safe no-op when |
useBuildNotification | Reads the live build-notification state from the nearest |
useBuildNotifierEngine | The polling/compare/dismiss engine behind |
createVersionRoute | Creates a Next.js App Router route handler that serves the current deployment's build id as |
resolveBuildId | Resolves a single canonical build identifier from the environment so the client (baked at build time) and the version endpoint (read at runtime) always derive their id from the same source. Next's deployment id wins when present so the baked client id matches Next's native |
Components
| Name | Description |
|---|---|
BuildNotifier | Headless render-prop over the build-notification state from the nearest provider. Renders exactly what the function returns — no markup or styles of its own. |
BuildNotifierProvider | Runs the build-notifier engine and publishes its state via context. Place high in the tree; render UI with |
Types
| Name | Description |
|---|---|
WithBuildNotifierOptions | Options for |
BuildNotificationState | The reactive state + actions exposed by the engine, context hook, and render-prop. |
BuildNotifierConfig | Configuration for the build notifier engine, provider, and render-prop. |
BuildNotifierProps | Props for |
BuildNotifierProviderProps | Props for |
VersionResponse | The shape returned by the version endpoint. |
BuildIdEnv | The subset of environment variables |
CreateVersionRouteOptions | Options for |
Other
| Name | Description |
|---|---|
BuildIdEnv | — |
resolveBuildId | — |