-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Next.js: Sourcemaps are being generated for edge despite no sentry.edge.config.ts #15849
Comments
Thanks for writing in. We'll take a look. |
Actually, now that I think of this, this is currently unfixable because we cannot detect at build-time whether the edge runtime is in use and the Sentry SDK is initialized for the edge runtime or not. We are uploading when Next.js does the edge runtime build pass. I'll need to go ahead and close this - thanks for reporting though! To lessen the blow a bit: Next.js is working on a hook that runs at the end of the build and we'll be able to use that to upload sourcemap. This will lead to only one uploading pass to happen. 👍 |
@lforst thanks for the quick response! Makes sense, as Next is the one doing the building and sourcemap generation (slipped my mind, sorry!). So there's no way to stop next from building this env? (maybe a question for elsewhere)
This may be one to add into #15100 (comment) (I don't see it mentioned there) |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
9.5.0
Framework Version
Next.js 15.2.3, React 18.3.1
Link to Sentry event
No response
Reproduction Example/SDK Setup
No response
Steps to Reproduce
sentry.edge.config.ts
Expected Result
I'd expect that when running next build (using
withSentryConfig
) that sourcemaps are not created and uploaded for the edge environment. Maybe there's another way to disable the edge environment.Actual Result
Edge sourcemaps are created and uploaded to sentry
The text was updated successfully, but these errors were encountered: