Description
Problem Statement
The Next.js build output contains among other things files that follow the naming scheme .next/static/chunks/{number}-{hash}.js(.map)?
.
We don't upload these files for source maps resolving because they can get very large and make builds take several minutes because we have to wait for the upload.
The files in question contain library/framework code (e.g. Sentry SDK code, Next.js internal code, or code that belongs to other third-party libraries). In most cases, this means that having these files not be resolved is actually not that bad because errors don't originate from these locations very often. However, if they do, it is basically impossible to tell where errors come from.
Additionally, the unresolved stack frames will result in very ugly banners on the issue page:
Users can use the widenClientFileUpload: true
option to upload these files, but it is not immediately obvious that this will resolve the problem.
Solution Brainstorm
We can think about the following:
- Turn
widenClientFileUpload
on by default. This is very risky because after digging a bit in older PRs and issues we seemed to have a problem that uploads took up to 10 minutes. (fix(nextjs): StopSentryWebpackPlugin
from uploading unnecessary files #3845) - Display a warning on the issues page if we detect that the stack trace would profit from
widenClientFileUpload
.