Browse Source
Merge pull request #4 from gre/polish
should fix Sentry to work in prod
master
NastiaS
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
5 deletions
-
src/sentry/install.js
-
webpack/plugins.js
|
|
@ -2,11 +2,9 @@ |
|
|
|
|
|
|
|
require('../env') |
|
|
|
|
|
|
|
const { SENTRY_URL } = process.env |
|
|
|
|
|
|
|
export default (Raven: any, shouldSendCallback: () => boolean, userId: string) => { |
|
|
|
if (!SENTRY_URL) return |
|
|
|
let r = Raven.config(SENTRY_URL, { |
|
|
|
if (!__SENTRY_URL__) return |
|
|
|
let r = Raven.config(__SENTRY_URL__, { |
|
|
|
captureUnhandledRejections: true, |
|
|
|
allowSecretKey: true, |
|
|
|
release: __APP_VERSION__, |
|
|
|
|
|
@ -3,7 +3,7 @@ const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer') |
|
|
|
const pkg = require('../package.json') |
|
|
|
require('../src/globals') |
|
|
|
|
|
|
|
const { BUNDLE_ANALYZER } = process.env |
|
|
|
const { BUNDLE_ANALYZER, SENTRY_URL } = process.env |
|
|
|
|
|
|
|
module.exports = type => { |
|
|
|
const plugins = [ |
|
|
@ -12,6 +12,7 @@ module.exports = type => { |
|
|
|
__GLOBAL_STYLES__: JSON.stringify(__GLOBAL_STYLES__), |
|
|
|
__DEV__, |
|
|
|
__PROD__, |
|
|
|
__SENTRY_URL__: SENTRY_URL, |
|
|
|
'process.env.NODE_ENV': JSON.stringify(__ENV__), |
|
|
|
}), |
|
|
|
] |
|
|
|