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) } }) ]