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

chore(sentry/nextjs): move rollup to dev-deps #6982

Conversation

belgattitude
Copy link
Contributor

Not sure if rollup is used on a production build (?).

If not make sense to move it to dev dependencies.

Shave off few Mb's when not using standalone builds.

image

@@ -27,13 +26,14 @@
"@sentry/utils": "7.34.0",
"@sentry/webpack-plugin": "1.20.0",
"chalk": "3.0.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wondering also about chalk. Kept it cause wasn't sure

@AbhiPrasad
Copy link
Member

Hey @belgattitude, thanks for opening a PR! We do use rollup in the production build - in particular when you add sentry to your next.config.js. We use it to help us auto-instrument your api routes for errors and performance, as is described here. The PR that added this has some more details if you're interested in the technical details.

Your final production build should not include rollup (it should be tree-shaken away, both on the client and server).

Closing this PR as a result, but please let us know if you have any questions!

@AbhiPrasad AbhiPrasad closed this Jan 30, 2023
@belgattitude
Copy link
Contributor Author

Smart 🧞

Imho, I would have made it opt-in.

It's a nice feature, a blog post link from the release notes (i personally often refer to the rn from bots, like belgattitude/nextjs-monorepo-example#3231 ).

Would help discovering

Anyway keep up the amazing work.

@AbhiPrasad
Copy link
Member

Imho, I would have made it opt-in.

This is fair - but would be a worse out of the box experience for users. The issue here is that not using rollup to wrap routes means you don't get visibility into your errors in your api/edge functions - and we have no way around this because of how NextJS/Vercel works under the hood. We talked to the Vercel team about improving this, but they seem not want to expose the appropriate hooks for us to use, so we have to use this.

a blog post link from the release notes... ...Would help discovering

Thanks for the feedback, we'll keep this in mind. If you have any feedback/comments, please let us know!

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.

2 participants