diff --git a/src/setup/raven.js b/src/setup/raven.js index 9778ce8..2c74d4e 100644 --- a/src/setup/raven.js +++ b/src/setup/raven.js @@ -3,7 +3,7 @@ import Raven from 'raven-js'; const setupRaven = () => { Raven.config(process.env.SENTRY_KEY, { whitelistUrls: [/https:\/\/(.*\.)?regexper\.com/], - environment: process.env.NODE_ENV, + environment: process.env.DEPLOY_ENV, debug: (process.env.NODE_ENV !== 'production'), release: process.env.BUILD_ID }); diff --git a/src/setup/raven.test.js b/src/setup/raven.test.js index 49c01f0..e63fcb6 100644 --- a/src/setup/raven.test.js +++ b/src/setup/raven.test.js @@ -15,7 +15,7 @@ describe('setupRaven', () => { }); it('sets the environment', () => { - process.env.NODE_ENV='test environment'; + process.env.DEPLOY_ENV='test environment'; setupRaven(); expect(Raven.config).toHaveBeenCalledWith(expect.anything(), expect.objectContaining({ environment: 'test environment' diff --git a/webpack.common.js b/webpack.common.js index 2f78277..a263857 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -50,6 +50,7 @@ module.exports = { plugins: [ new webpack.EnvironmentPlugin({ NODE_ENV: 'development', + DEPLOY_ENV: 'development', GA_PROPERTY: null, SENTRY_KEY: null, BANNER: process.env.NODE_ENV === 'production' ? null : (process.env.NODE_ENV || 'development'),