Last active
June 22, 2018 14:44
-
-
Save yann-yinn/3edd22d5558b2a7f25cc6e4bfb3362f7 to your computer and use it in GitHub Desktop.
create-react-app raven 3 - do not send report in development mode
This file contains hidden or 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
<!-- /public/index.html --> | |
<% if (process.env.NODE_ENV == 'production') { %> | |
<script src="https://cdn.ravenjs.com/3.26.2/raven.min.js" crossorigin="anonymous"></script> | |
<script>Raven.config('https://[email protected]/1230983', { | |
environment: "%NODE_ENV%", | |
}).install(); | |
</script> | |
<% } %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
l.5 I guess you already know the environment since you are inside the 'production' branch of the if