CLI to build and develop Next.js apps for Cloudflare Pages
### next-on-pages environment related information System: Platform: darwin CPU: arm64 Apple M3 Pro Memory: 18 GB Shell: /bin/zsh Package Manager Used: npm (10.5.0) Relevant Packages: @cloudflare/next-on-pages: 1.13.2 next: 14.2.5 @sentry/nextjs: 8.26.0 ### Description When installing Sentry in any Next.js project, it massively bloats the bundle size, going way beyond the limit of 25MB for normal projects. For example, in my project, it increases the bundle size almost by a factor of 10, reaching 70MB. This, of course, is unreasonable, and I suspect that it has something to do with the deduplication that Cloudflare performs during the build, but I'm not really sure. I think this issue is somehow related to [this GitHub issue](https://github.com/cloudflare/next-on-pages/issues/678), which is caused by the vercel/otel package. Overall, it prevents the use of Cloudflare Pages for Next.js in production at some scale, as there seems to be no working option to use an observability tool. We are overall really satisfied with hosting on Cloudflare, but this might force us to switch soon. ### Reproduction Steps to reproduce: 1. Clone a next.js project (I will use https://github.com/vercel/ai-chatbot as example) 2. Create a build using `npx @cloudflare/next-on-pages` 3. Check the bundle size in the folder `.vercel/output/static/_worker.js` (for the above example I arrive at 4.1 MB) 4. Install Sentry and jump through the setup (`npx @sentry/wizard@latest -i nextjs`) 5. Build and check the bundle size again (for the above example I arrive at 15.8 MB) ### Pages Deployment Method None ### Pages Deployment ID _No response_ ### Additional Information _No response_ ### Would you like to help? - [X] Would you like to help fixing this bug?
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be resolved. The issue was opened by jantiegges and has received 7 comments.