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 resolve.alias treeshaking hack #4276

Merged
merged 1 commit into from Dec 14, 2021

Conversation

lobsterkatie
Copy link
Member

@lobsterkatie lobsterkatie commented Dec 14, 2021

In #3978, code was introduced to prevent node tracing integrations (mongo, postgres, etc) from appearing in the browser bundle where they don't belong. However, as part of our larger push to make our code more treeshakable, we recently changed how we export those integrations, making the previous workaround unnecessary.

As a bonus, this should fix a rendering issue some users were having when using the fallback flag.

Tested locally and on vercel.

Fixes #4090.

@github-actions
Copy link
Contributor

size-limit report

Path Base Size (626102f) Current Size Change
@sentry/browser - CDN Bundle (gzipped) 22.45 KB 22.45 KB +0.02% 🔺
@sentry/browser - Webpack 23.29 KB 23.29 KB 0%
@sentry/browser - Webpack - gzip = false 82.73 KB 82.73 KB 0%
@sentry/react - Webpack 23.32 KB 23.32 KB 0%
@sentry/nextjs Client - Webpack 48.07 KB 48.07 KB 0%
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 29.98 KB 29.98 KB 0%

@lobsterkatie
Copy link
Member Author

Here is the graph for the @sentry/tracing part of the browser bundle when building a nextjs app with this branch of the SDK - no mongo and postgres!

image

@lobsterkatie lobsterkatie merged commit 010d37f into master Dec 14, 2021
@lobsterkatie lobsterkatie deleted the kmclb-nextjs-remove-resolve-alias-false branch December 14, 2021 14:40
onurtemizkan pushed a commit that referenced this pull request Dec 19, 2021
In #3978, code was introduced to prevent node tracing integrations (mongo, postgres, etc) from appearing in the browser bundle where they don't belong. However, as part of our larger push to make our code more treeshakable, we recently changed how we export those integrations[1], making the previous workaround unnecessary.

As a bonus, this should fix a rendering issue some users were having when using the `fallback` flag.

Tested locally and on vercel.

Fixes #4090.

[1] #4204
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.

Error to render page on NextJs 12 with fallback = true
2 participants