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
10.21.0
Framework Version
Next 16.0.0
Link to Sentry event
No response
Reproduction Example/SDK Setup
https://github.com/BTOdell/sentry-nextjs-standalone-bug
Steps to Reproduce
- Set Next.js build output to 'standalone'
- Import Sentry SDK from
instrumentation.ts (don't even need to configure Sentry in next.config.ts)
Expected Result
Next.js standalone build output should only contain the minimal files needed to run the app
Actual Result
Standalone output directory contains copy of the entire repository / project
Additional Context
Confirmed that this bug does not happen with Next 15.4.4 with @sentry/nextjs v9 nor v10.
Likely a compatibility issue with Next 16?
May be related to #18001, but I'm not getting a build error - just incorrect build output.
Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
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
10.21.0
Framework Version
Next 16.0.0
Link to Sentry event
No response
Reproduction Example/SDK Setup
https://github.com/BTOdell/sentry-nextjs-standalone-bug
Steps to Reproduce
instrumentation.ts(don't even need to configure Sentry innext.config.ts)Expected Result
Next.js standalone build output should only contain the minimal files needed to run the app
Actual Result
Standalone output directory contains copy of the entire repository / project
Additional Context
Confirmed that this bug does not happen with Next 15.4.4 with
@sentry/nextjsv9 nor v10.Likely a compatibility issue with Next 16?
May be related to #18001, but I'm not getting a build error - just incorrect build output.
Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it.