Skip to content

Commit c0577da

Browse files
author
Luca Forstner
committed
Remove defineProperty call
1 parent 4c3c3ce commit c0577da

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

packages/nextjs/src/config/loaders/dataFetchersLoader.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,10 @@ export default function wrapDataFetchersLoader(this: LoaderThis<LoaderOptions>,
142142
// vice versa. By importing the loader directly we avoid the side effects.
143143
outputFileContent += `
144144
import { default as _sentry_default } from "${this.resourcePath}?sentry-proxy-loader";
145-
import { withSentryGetInitialProps } from "@sentry/nextjs/build/esm/config/wrappers";
146-
Object.defineProperty(
147-
_sentry_default,
148-
'getInitialProps',
149-
{
150-
...Object.getOwnPropertyDescriptor(_sentry_default, 'getInitialProps'),
151-
value: withSentryGetInitialProps(_sentry_default.getInitialProps)
152-
}
153-
);
145+
import { withSentryGetInitialProps } from "@sentry/nextjs";
146+
147+
_sentry_default.getInitialProps = withSentryGetInitialProps(_sentry_default.getInitialProps);
148+
154149
export default _sentry_default;`;
155150
}
156151

0 commit comments

Comments
 (0)