Skip to content

Commit 6f81679

Browse files
committed
⚡ Default NODE_ENV to production
`npm start` will always explicitly set NODE_ENV=development. So if it's not set, the app is being run outside of the active dev context. This way we'll be able to start filtering exception reports more easily from stuff we should really pay attention to.
1 parent 54f119b commit 6f81679

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/bugsnag.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ module.exports = bugsnag;
3939
* https://github.com/bugsnag/bugsnag-js#user
4040
*/
4141
module.exports.listen = function listen() {
42-
if (!process.env.NODE_ENV) {
43-
process.env.NODE_ENV = 'development';
44-
}
45-
4642
_.assign(bugsnag, {
4743
apiKey: TOKEN,
4844
autoNotify: true,

src/electron/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
if (!process.env.NODE_ENV) {
2+
process.env.NODE_ENV = 'production';
3+
}
14
// Start crash-reporter asap so if anything goes
25
// wrong, we can at least view the crash reports
36
// locally. When a crash occurs, a `.dmp` file

0 commit comments

Comments
 (0)