Next.js Discord

Discord Forum

Does next.js generates sourcemaps only for client side code? Or does it do it for server side too?

Unanswered
Ant posted this in #help-forum
Open in Discord
Avatar
AntOP
Title

5 Replies

Avatar
DirtyCajunRice | AppDir
it builds it for all react code.
Avatar
AntOP
oh ok, thanks! So when generating the sourcemaps files, I should worry about having sensible data leaked, right? When uploading them to a third provider, I should do something as the following:

- next.js generates the source maps files at build time
- I run a script to upload them to the third party provider
- Them I run a script to delete the sourcemaps files right after so they don't get exposed

Is this approach correct?
Avatar
DirtyCajunRice | AppDir
why are you generating source maps at all?
Avatar
AntOP
to get better/proper error messages on monitoring services (Bugsnag in my case)
Avatar
DirtyCajunRice | AppDir
ive never done anything like that it sounds like its so much effort for so little valie