From d3ff418f91e76801d7d2e10c09e7240a0dd634eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=ABck=20V=C3=A9zien?= Date: Mon, 29 Jan 2018 15:25:18 +0100 Subject: [PATCH] Fix build in production --- src/env.js | 4 ++++ src/main/index.js | 2 ++ src/renderer/index.js | 2 ++ 3 files changed, 8 insertions(+) create mode 100644 src/env.js diff --git a/src/env.js b/src/env.js new file mode 100644 index 00000000..5558f6c4 --- /dev/null +++ b/src/env.js @@ -0,0 +1,4 @@ +process.env = { + ...process.env, + NODE_ENV: (process.env || {}).NODE_ENV || 'production', +} diff --git a/src/main/index.js b/src/main/index.js index d29f2b74..8a556e40 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -1,5 +1,7 @@ // @flow +require('env') + process.setMaxListeners(0) require('../globals') diff --git a/src/renderer/index.js b/src/renderer/index.js index eb26a1a0..2a2f1a8f 100644 --- a/src/renderer/index.js +++ b/src/renderer/index.js @@ -1,5 +1,7 @@ // @flow +import 'env' + import React from 'react' import Raven from 'raven-js' import { render } from 'react-dom'