ref(nextjs): Remove NFT build time exclusions #6846
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 ourwithSentryConfig
function to return a function so that we can make an exception for thedev
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.