-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(nextjs): Exclude SDK from Edge runtime bundles #6683
Conversation
3a307cf
to
ec34a01
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feels like a code smell that we have to scatter this check everywhere - but I guess no good way around it that doesn't require further refactoring
isServer, | ||
userSentryOptions.excludeServerRoutes, | ||
isDev, | ||
buildContext.nextRuntime === 'edge', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
l: Only thing I'd like to see here is the equality check extracted into a helper func, but nbd.
Honestly, I thought the exact same thing while making this change. Let me see if I can somehow clean this up a bit without too much effort, otherwise, I'll do it in a follow-up soon. |
size-limit report 📦
|
Ok I think this is hopeless. This file needs a major refactoring. |
Ref #6120
Builds currently emit warnings when there is a route using the Vercel edge runtime because we are injecting code into the serverless bundles that is using APIs that are not WinterCG compatible or we are wrapping with code that uses server SDK functions even though we are injecting the client SDK.
Also resolves #5974