Skip to content

Commit fab8e4b

Browse files
committed
fix: turbopack config access
1 parent 2f1de29 commit fab8e4b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/nextjs/src/config/turbopack/constructTurbopackConfig.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@ export function constructTurbopackConfig({
2020
nextJsVersion,
2121
}: {
2222
userNextConfig: NextConfigObject;
23-
userSentryOptions: SentryBuildOptions;
23+
userSentryOptions?: SentryBuildOptions;
2424
routeManifest?: RouteManifest;
2525
nextJsVersion?: string;
2626
}): TurbopackOptions {
2727
// If sourcemaps are disabled, we don't need to enable native debug ids as this will add build time.
2828
const shouldEnableNativeDebugIds =
2929
(supportsNativeDebugIds(nextJsVersion ?? '') && userNextConfig?.turbopack?.debugIds) ??
30-
userSentryOptions.sourcemaps?.disable !== true;
30+
userSentryOptions?.sourcemaps?.disable !== true;
3131

3232
const newConfig: TurbopackOptions = {
3333
...userNextConfig.turbopack,
3434
...(shouldEnableNativeDebugIds ? { debugIds: true } : {}),
3535
};
3636

3737
const tunnelPath =
38-
userSentryOptions.tunnelRoute !== undefined &&
38+
userSentryOptions?.tunnelRoute !== undefined &&
3939
userNextConfig.output !== 'export' &&
4040
typeof userSentryOptions.tunnelRoute === 'string'
4141
? `${userNextConfig.basePath ?? ''}${userSentryOptions.tunnelRoute}`

0 commit comments

Comments
 (0)