Back out "[flipper] Export init function"
Summary: This seems to break initialization. I'm not quite sure why, but inside the exported function, nothing else from the file appears to be visible. Original commit changeset: 55b2a61186e6 Reviewed By: danielbuechele Differential Revision: D9849812 fbshipit-source-id: d88973721da82040e1f29669acade6c883619ce8
This commit is contained in:
committed by
Facebook Github Bot
parent
bc3ccfce5d
commit
c93ab83bd9
@@ -1,10 +0,0 @@
|
||||
/**
|
||||
* Copyright 2018-present Facebook.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
* @format
|
||||
*/
|
||||
|
||||
export default function init() {
|
||||
// no-op
|
||||
}
|
||||
@@ -14,10 +14,9 @@ export {SonarBasePlugin, SonarPlugin, SonarDevicePlugin} from './plugin.js';
|
||||
export {createTablePlugin} from './createTablePlugin.js';
|
||||
export {default as SonarSidebar} from './chrome/SonarSidebar.js';
|
||||
|
||||
export * from './init.js';
|
||||
export {default} from './init.js';
|
||||
|
||||
export {default as AndroidDevice} from './devices/AndroidDevice.js';
|
||||
export {default as Device} from './devices/BaseDevice.js';
|
||||
export {default as IOSDevice} from './devices/IOSDevice.js';
|
||||
|
||||
import init from './init.js';
|
||||
|
||||
init();
|
||||
|
||||
10
src/init.js
10
src/init.js
@@ -62,11 +62,10 @@ const AppFrame = () => (
|
||||
</TooltipProvider>
|
||||
);
|
||||
|
||||
export default function init() {
|
||||
// $FlowFixMe: this element exists!
|
||||
ReactDOM.render(<AppFrame />, document.getElementById('root'));
|
||||
// $FlowFixMe: service workers exist!
|
||||
navigator.serviceWorker
|
||||
// $FlowFixMe: this element exists!
|
||||
ReactDOM.render(<AppFrame />, document.getElementById('root'));
|
||||
// $FlowFixMe: service workers exist!
|
||||
navigator.serviceWorker
|
||||
.register(
|
||||
process.env.NODE_ENV === 'production'
|
||||
? path.join(__dirname, 'serviceWorker.js')
|
||||
@@ -76,4 +75,3 @@ export default function init() {
|
||||
(r.installing || r.active).postMessage({precachedIcons});
|
||||
})
|
||||
.catch(console.error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user