You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unclear to me if this is supported or not at the moment, but wanted to flag it in case not.
My error handler, Sentry, needs source maps to map the minified stacktraces to my repo source. Currently, my webpack next.js build outputs source maps for files like this:
~/_next/static/chunks/1249.d9777ee89355e4b6.js
While the errors reported come out of Cloudflare pages like this:
We don't currently generate any sort of source map. I've spoken to someone else about this before and I personally don't think it's something that would be possible with how our tooling currently works. I may be wrong so feel free to chime in if someone disagrees with what I'm writing.
Our final worker is several steps of processing away from your source code. Your source code gets built by Next.js, it then gets transformed again by Vercel's CLI and everything is inlined into one file for each edge-runtime route, and then we process that again to generate the final worker.
The part where I think this gets tricky and near-impossible to generate source maps for is how we process the code. We take all of the Vercel functions and then dedupe and minify all the functions. The deduping process then means that we could have one code snippet for a webpack chunk that is shared by 20 different edge functions generated by the Vercel CLI, instead of there being one for each file. So all of a sudden, we have all these chunks split out of the route files that can map towards a variety of different files, thereby (i assume) making it incredibly hard to try and generate a useful source map.
Description
Unclear to me if this is supported or not at the moment, but wanted to flag it in case not.
My error handler, Sentry, needs source maps to map the minified stacktraces to my repo source. Currently, my webpack next.js build outputs source maps for files like this:
~/_next/static/chunks/1249.d9777ee89355e4b6.js
While the errors reported come out of Cloudflare pages like this:
__next-on-pages-dist__/webpack/62d6966c94b522734ceb09853b489431.js
Is there currently a known way to do this? I haven't been able to find anything documented or in the source.
Additional Information
No response
Would you like to help?
The text was updated successfully, but these errors were encountered: