From d6a2ea00196a30150bedab1539f0d498b4d3d4b7 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Sat, 9 Jul 2016 10:09:32 -0700 Subject: [PATCH] cleanup --- app/plugins.js | 4 ++-- app/webpack.config.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/plugins.js b/app/plugins.js index 253091a0..916e9300 100644 --- a/app/plugins.js +++ b/app/plugins.js @@ -46,8 +46,7 @@ const updateProxy = (name) => { modules.forEach((mod) => { const decorator = mod[`decorate${name}`]; if (decorator) { - console.log('decorating', name); - decorated = decorator(Component, __webpack_require__); + decorated = decorator(Component); } }); if (decorated !== Component) { @@ -74,6 +73,7 @@ ipcRenderer.on('plugins change', () => { updateProxies(); }); +// for each component, we return the `react-proxy`d component export default function decorate (Component, props = null) { const name = Component.name; diff --git a/app/webpack.config.js b/app/webpack.config.js index 76197735..251f9a82 100644 --- a/app/webpack.config.js +++ b/app/webpack.config.js @@ -35,7 +35,7 @@ module.exports = { new webpack.ExternalsPlugin('commonjs', ['electron']), new webpack.DefinePlugin({ 'process.env': { - 'NODE_ENV': JSON.stringify(process.env.NODE_ENV) + 'NODE_ENV': JSON.stringify(nodeEnv) } }) ]