mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
cleanup
This commit is contained in:
parent
412717ce0e
commit
d6a2ea0019
2 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue