You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(nextjs): Don't init SDK on Vercel Edge Runtime (#6408)
This PR fixes a problem where we crash out of the box on Vercel and also in production builds when the `experimental-edge` runtime is used in API routes.
We use the fact that Next.js string replaces the global `EdgeRuntime` when a server bundle is supposed to be run on the edge runtime. If this is the case we no-op `Sentry.init` and log a message. We also have to not wrap the API routes automatically in that case.
Tried to add quick tests that test if the API routes still crash. But with our integration test setup it was a pita to get working because this is only really a thing for Next.js 12+.
0 commit comments