Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions packages/nextjs/src/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ export type UserSentryOptions = {
// up uploading too many files, which is why this defaults to `false`.
widenClientFileUpload?: boolean;

// Automatically wrap `getServerSideProps`, `getStaticProps`, and `getStaticPaths` in order to instrument them for
// tracing.
autoWrapDataFetchers?: boolean;
experiments?: {
// Automatically wrap `getServerSideProps`, `getStaticProps`, and `getStaticPaths` in order to instrument them for
// tracing.
autoWrapDataFetchers?: boolean;
};
};

export type NextConfigFunction = (phase: string, defaults: { defaultConfig: NextConfigObject }) => NextConfigObject;
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/src/config/webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function constructWebpackConfigFunction(
],
};

if (userSentryOptions.autoWrapDataFetchers) {
if (userSentryOptions.experiments?.autoWrapDataFetchers) {
newConfig.module.rules.push({
test: pageRegex,
use: [
Expand Down