sentry-javascript icon indicating copy to clipboard operation
sentry-javascript copied to clipboard

@sentry/remix sourcemaps in production

Open AbhiPrasad opened this issue 3 years ago • 0 comments

Discussed in https://github.com/getsentry/sentry-javascript/discussions/5732

Originally posted by thomasverleye September 13, 2022 When running remix build --sourcemap you'll get following warning:

$ remix build --sourcemap

Building Remix app in production mode...

⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
You have enabled source maps in production. This will make your server-side code visible to the public and is highly discouraged! If you insist, please ensure you are using environment variables for secrets and not hard-coding them into your source!
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️

Built in 501ms

This is a valid warning they are raising, shouldn't user be advised to remove the sourcemap after uploading it to Sentry with the CLI? And if so can we add this as a suggestion in the docs?

AbhiPrasad avatar Sep 14 '22 12:09 AbhiPrasad