Skip to content
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

ref(nextjs): Remove NFT build time exclusions #6846

Merged
merged 2 commits into from Jan 18, 2023

Conversation

lforst
Copy link
Member

@lforst lforst commented Jan 18, 2023

First, a bit of history: A while back we decided to exclude our build time dependencies from the files that are uploaded to AWS Lambdas through Vercel. This was done by modifying the NFT Plugin Next.js injects. This caused us to break during runtime because the build files could be required when the server starts. The fix for that however broke next dev and we had to convert our withSentryConfig function to return a function so that we can make an exception for the dev phase.

The last change caused an avalanche of issues to appear which we mostly brushed off and told users to "fix" their Next.js configs to be able to deal with withSentryConfig to return a function.
The issues have now reached a critical mass so we should unship this feature, just so we don't ruin DX for a ton of people.

Here are the issues related to this I could find retroactively:

IMO the build time dependencies we have aren't that huge that it is worth adding a lot of complexity and DX degradation and I verified that Sentry CLI is still not included in the generated nft files.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 18, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.82 KB (+0.01% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 61.47 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.5 KB (+0.02% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 54.77 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 20.22 KB (0%)
@sentry/browser - Webpack (minified) 66.17 KB (0%)
@sentry/react - Webpack (gzipped + minified) 20.24 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 47.52 KB (+0.03% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.74 KB (+0.03% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 25.03 KB (+0.05% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 43.12 KB (-0.82% 🔽)
@sentry/replay - Webpack (gzipped + minified) 38.45 KB (-1% 🔽)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 60.37 KB (-0.58% 🔽)

@lforst lforst marked this pull request as ready for review January 18, 2023 13:28
Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@lforst lforst merged commit 91f447c into master Jan 18, 2023
@lforst lforst deleted the lforst-unship-nft-build-time-exclusions branch January 18, 2023 13:37
@baraeb92
Copy link

Maybe doing this on next major version can be done, as long as Sentry team gives a clear warning and how to fix on the release note or documentation.

@lforst @AbhiPrasad

@lforst
Copy link
Member Author

lforst commented Jan 21, 2023

@baraeb92 First, let's see if the community even sees a need for removing build-time deps from NFT dependencies. Even though doing it in a major would make the most sense, from what I've seen, if we return a function, many people have trouble setting up Sentry when their configs are more complex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants