From ab8a55a8c6b1e734909ee9d1f868743243305b68 Mon Sep 17 00:00:00 2001 From: Tom Kirkpatrick Date: Mon, 17 Dec 2018 21:02:54 +0100 Subject: [PATCH] fix(electron): addlow DEBUG_PROD in production builds --- app/main.dev.js | 2 +- internals/webpack/webpack.config.main.prod.js | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/app/main.dev.js b/app/main.dev.js index d5fae369b78..467850fe69c 100644 --- a/app/main.dev.js +++ b/app/main.dev.js @@ -150,7 +150,7 @@ app.on('ready', async () => { /** * In development mode or when DEBUG_PROD is set, enable debugging tools. */ - if (process.env.NODE_ENV === 'development' || process.env.DEBUG_PROD === 'true') { + if (process.env.NODE_ENV === 'development' || process.env.DEBUG_PROD) { installExtension(REACT_DEVELOPER_TOOLS) .then(name => mainLog.debug(`Added Extension: ${name}`)) .catch(err => mainLog.warn(`An error occurred when installing REACT_DEVELOPER_TOOLS: ${err}`)) diff --git a/internals/webpack/webpack.config.main.prod.js b/internals/webpack/webpack.config.main.prod.js index 2213362dc9f..e36ff2d93f5 100644 --- a/internals/webpack/webpack.config.main.prod.js +++ b/internals/webpack/webpack.config.main.prod.js @@ -3,7 +3,6 @@ */ import path from 'path' -import webpack from 'webpack' import merge from 'webpack-merge' import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer' import baseConfig, { rootDir } from './webpack.config.base' @@ -30,16 +29,6 @@ export default merge.smart(baseConfig, { new BundleAnalyzerPlugin({ analyzerMode: process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled', openAnalyzer: process.env.OPEN_ANALYZER === 'true' - }), - - /** - * Create global constants which can be configured at compile time. - * - * Useful for allowing different behaviour between development builds and - * release builds - */ - new webpack.EnvironmentPlugin({ - DEBUG_PROD: false }) ],