NextJS 13 integration causes bundle to increase significantly #9048
Replies: 5 comments 9 replies
-
checking with the team the source of this error. In the logs or in sentry do you see that some of the artifacts are still uploaded? Are you stack traced still resolved in issues? |
Beta Was this translation helpful? Give feedback.
-
One thing that definitely increases bundle size a lot is the |
Beta Was this translation helpful? Give feedback.
-
Furthermore, you might want to look into enabeling advanced tree shaking within the Sentry SDK: https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/tree-shaking/ |
Beta Was this translation helpful? Give feedback.
-
The error you're seeing is unrelated to bundle size. It is Amplify complaining that you're uploading to many assets. This is likely because you have a lot or big dependencies. Please check the size of your node_modules (or individual packages within). This might be the SDK or it could be a very big dependency and our SDK just happened to push it over the edge. |
Beta Was this translation helpful? Give feedback.
-
It was a problem with Amplify hosting (issue), we simply switched to Vercel hosting |
Beta Was this translation helpful? Give feedback.
-
I try to integrate Sentry to the project. I use the installation wizard and all seem to work however when I deploy the app to AWS Amplify I hit a output size limit:

When I inspect the statistics produced by

yarn build
I can see a significant increase in bundle sizes:I did not provide any custom configuration to the project besides what the wizard created.
nextjs.config.js
sentry.client.config.ts
sentry.edge.config.ts
sentry.server.config.ts
src/app/[locale]/sentry-example-page/page.tsx
next v.13.4.19
@sentry/nextjs: v^7.69.0
And that's all there is to it...
Beta Was this translation helpful? Give feedback.
All reactions