diff --git a/src/plugins/index.js b/src/plugins/index.js index 209d68429..47ced6374 100644 --- a/src/plugins/index.js +++ b/src/plugins/index.js @@ -17,8 +17,6 @@ import { import {remote} from 'electron'; const plugins = new Map(); -// $FlowFixMe process.env not defined in electron API spec -const remoteEnv = remote.process.env; // expose Flipper and exact globally for dynamically loaded plugins window.React = React; @@ -33,14 +31,16 @@ const addIfNotAdded = plugin => { let disabledPlugins = []; try { - disabledPlugins = JSON.parse(remoteEnv.CONFIG || '{}').disabledPlugins || []; + // $FlowFixMe process.env not defined in electron API spec + disabledPlugins = JSON.parse(remote?.process.env.CONFIG || '{}').disabledPlugins || []; } catch (e) { console.error(e); } // Load dynamic plugins try { - JSON.parse(remoteEnv.PLUGINS || '[]').forEach(addIfNotAdded); + // $FlowFixMe process.env not defined in electron API spec + JSON.parse(remote?.process.env.PLUGINS || '[]').forEach(addIfNotAdded); } catch (e) { console.error(e); } diff --git a/src/ui/components/Interactive.js b/src/ui/components/Interactive.js index cb156d262..c3c17ac44 100644 --- a/src/ui/components/Interactive.js +++ b/src/ui/components/Interactive.js @@ -13,7 +13,7 @@ import { maybeSnapTop, SNAP_SIZE, } from '../../utils/snap.js'; -import {styled} from 'flipper'; +import {styled} from '../../ui'; const invariant = require('invariant'); const React = require('react'); diff --git a/src/ui/index.js b/src/ui/index.js index 045e1b167..f1ae73371 100644 --- a/src/ui/index.js +++ b/src/ui/index.js @@ -5,6 +5,7 @@ * @format */ +export {default as styled} from 'react-emotion'; export {default as Button} from './components/Button.js'; export {default as ToggleButton} from './components/ToggleSwitch.js'; export {