Created
December 22, 2017 21:05
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @see package.json#browser field | |
const Raven = require('raven') | |
if (process.env.NODE_ENV === 'production') { | |
Raven.config('YOUR_SENTRY_DSN').install() | |
} | |
module.exports = Raven |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
... | |
"browser": { | |
"raven": "raven-js" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment