-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
feat(config): enhance source map handling and debugging workflow #342
base: main
Are you sure you want to change the base?
Conversation
- Added `hidden-source-map` in Webpack config for client builds to secure debugging data. - Enhanced comments in `sourcemaps` configuration for clarity and future maintainability. - Included `FIXME` to confirm source map retention policy post-upload to Sentry.
@amaringonz is attempting to deploy a commit to the Ixartz's projects Team on Vercel. A member of the Team first needs to authorize it. |
@amaringonz thank you so much for your PR. Is it possible to share with me the documentation you use to make these changes? It's very hard for me to understand the changes and the result. The current configuration comes directly from Sentry using the CLI. It should be the default configuration provided by Sentry team. |
Thank you so much for reviewing my PR! Here’s the documentation and reasoning behind the changes I made: 1. Removal of
|
Thank you so much for your detailed response, I'll take a deep look at it, thank you for your patience. deleteSourcemapsAfterUpload looks good to me but the part with webpack:
Not really a huge fan making custom changes. It would be better to have Next.js config or Sentry config. |
Thank you for your feedback and for taking the time to review the PR! I understand your concern about making custom changes to the webpack configuration. The approach using config.devtool in the webpack function was primarily added because Next.js currently doesn’t provide a built-in way to customize the source map behavior for production builds without modifying the webpack config directly. The goal is to generate source maps only for the client-side code while preventing them from being publicly accessible. That said, I agree it would be ideal if Next.js or Sentry provided a dedicated option for handling source maps more elegantly. Until such a feature is available, this workaround helps maintain better control over source maps in production. If you have any alternative suggestions or a preference for a different approach, I’d be happy to explore it further. Thanks again for your time and feedback! |
This pull request introduces improvements to the Next.js configuration for handling source maps and debugging.
Changes
Source Map Security:
hidden-source-map
to the Webpack configuration for client builds, ensuring source maps are available for debugging while staying hidden in production environments.Comments and Documentation:
sourcemaps
configuration to provide better clarity and guide future maintainers on the impact of this setting.FIXME for Source Map Retention:
FIXME
to evaluate whether source maps should be retained locally after being uploaded to Sentry, ensuring alignment with debugging workflows.Rationale