Skip to content

Commit 55b60ee

Browse files
authored
docs(js): Document useRunAfterProductionCompileHook for Next.js (#15024)
1 parent f03e3f1 commit 55b60ee

File tree

1 file changed

+17
-0
lines changed
  • docs/platforms/javascript/guides/nextjs/configuration/build

1 file changed

+17
-0
lines changed

docs/platforms/javascript/guides/nextjs/configuration/build/index.mdx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,23 @@ Enables React component name tracking. When enabled, it annotates React componen
282282

283283
A list of React component names to exclude from component annotation.
284284

285+
</SdkOption>
286+
287+
<SdkOption name="useRunAfterProductionCompileHook" type="boolean" defaultValue="false(webpack)|true(turbopack)">
288+
289+
<Alert level="info" title="Version support">
290+
You can use this option with Next.js version 15.4.1 and later.
291+
</Alert>
292+
293+
Enables the use of the [`runAfterProductionCompile` hook from Next.js](https://nextjs.org/docs/app/building-your-application/configuring/running-post-build-tasks#the-runafterproductioncompile-hook) to upload sourcemaps after the build is completed.
294+
295+
- This option is set to `true` by default for Turbopack as there are no alternative ways to upload sourcemaps here.
296+
- This option is set to `false` for Webpack as the default behavior is to upload sourcemaps during the build process using the [Sentry Webpack Plugin](https://github.com/getsentry/sentry-javascript-bundler-plugins).
297+
298+
**Important:** Enabling this option will mutate your Next.js build output by injecting [Debug IDs](/platforms/javascript/guides/nextjs/sourcemaps/troubleshooting_js/debug-ids/) via the Sentry CLI. If you are relying on any sort of integrity hashes for your build artifacts, you will need to disable this option.
299+
300+
301+
285302
</SdkOption>
286303

287304
<SdkOption

0 commit comments

Comments
 (0)