Skip to content

Instantly share code, notes, and snippets.

@Tarabyte
Created December 22, 2017 21:05
Show Gist options
  • Save Tarabyte/993bbd9179b3dc768acf9df6778ade40 to your computer and use it in GitHub Desktop.
Save Tarabyte/993bbd9179b3dc768acf9df6778ade40 to your computer and use it in GitHub Desktop.
Get correct sentry client in next.js app w/o custom webpack config
// @see package.json#browser field
const Raven = require('raven')
if (process.env.NODE_ENV === 'production') {
Raven.config('YOUR_SENTRY_DSN').install()
}
module.exports = Raven
{
...
"browser": {
"raven": "raven-js"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment