Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Next.js: How to export onRouterTransitionStart from instrumentation-client in case of tree-shaking? #16571

Unanswered
maslowivan asked this question in Q&A
Discussion options

https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/tree-shaking/ has no information regarding exporting the captureRouterTransitionStart in case of tree-shaking

Also file is called main.js not instrumentation-client.ts (js) - why?

Should it be like this? Not clear

import { captureRouterTransitionStart } from "@sentry/nextjs";
// ...
export const onRouterTransitionStart = captureRouterTransitionStart;
You must be logged in to vote

Replies: 1 comment

Comment options

What exactly is the problem? If you do not use this function it should not be included anyhow, no need to manually tree-shake anything?

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /