Skip to content

[Next.js] Support setting different options for different runtimes (browser/server/edge) #13837

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

Open
lforst opened this issue Oct 1, 2024 · 0 comments

Comments

@lforst
Copy link
Contributor

lforst commented Oct 1, 2024

Originally posted by @ricardomatias in discussions:

I've removed the sentry.edge.config.ts and sentry.server.config.ts and I still get sourcemaps for both of them. I only want client sourcemaps.

I don't think this is possible right now without some very ugly hacks. We should provide some way of setting different options for the different runtimes.

Idea No.1 and probably my favorite: Allow for the sentryBuildOptions argument in withSentryConfig to be a function/callback that receives the runtime as an argument. (probably should pass it within an object so that we can extend it in the future)

@lforst lforst changed the title [Next.js] Support setting different webpack plugin options for different runtimes (browser/server/edge) [Next.js] Support setting different options for different runtimes (browser/server/edge) Oct 1, 2024
@AbhiPrasad AbhiPrasad added the Package: nextjs Issues related to the Sentry Nextjs SDK label Nov 1, 2024
@stephanie-anderson stephanie-anderson removed the Package: nextjs Issues related to the Sentry Nextjs SDK label Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants