This commit is contained in:
Guillermo Rauch 2016-07-09 10:09:32 -07:00
parent 412717ce0e
commit d6a2ea0019
2 changed files with 3 additions and 3 deletions

View file

@ -46,8 +46,7 @@ const updateProxy = (name) => {
modules.forEach((mod) => { modules.forEach((mod) => {
const decorator = mod[`decorate${name}`]; const decorator = mod[`decorate${name}`];
if (decorator) { if (decorator) {
console.log('decorating', name); decorated = decorator(Component);
decorated = decorator(Component, __webpack_require__);
} }
}); });
if (decorated !== Component) { if (decorated !== Component) {
@ -74,6 +73,7 @@ ipcRenderer.on('plugins change', () => {
updateProxies(); updateProxies();
}); });
// for each component, we return the `react-proxy`d component
export default function decorate (Component, props = null) { export default function decorate (Component, props = null) {
const name = Component.name; const name = Component.name;

View file

@ -35,7 +35,7 @@ module.exports = {
new webpack.ExternalsPlugin('commonjs', ['electron']), new webpack.ExternalsPlugin('commonjs', ['electron']),
new webpack.DefinePlugin({ new webpack.DefinePlugin({
'process.env': { 'process.env': {
'NODE_ENV': JSON.stringify(process.env.NODE_ENV) 'NODE_ENV': JSON.stringify(nodeEnv)
} }
}) })
] ]