Make Store initialization independent of module order

Summary: Changed some imports, and again the Flipper initialisation broke. Refactored the store initialization to create nowhere module local constants, which prevents generally against module loading issues, making it possible to load all code first, and then intialise things through the `init()` method, which should make Flipper initialisation a lot more robust to changes

Reviewed By: passy

Differential Revision: D29233603

fbshipit-source-id: 322cb87cba23228b1d7a88634b7b3995e27cc277
This commit is contained in:
Michel Weststrate
2021-06-21 08:35:52 -07:00
committed by Facebook GitHub Bot
parent 806dd63f68
commit 6fb28df855
12 changed files with 148 additions and 129 deletions

View File

@@ -15,7 +15,7 @@
global.electronRequire = window.require;
</script>
<script>
window.addEventListener('flipper-store-ready', () => global.Flipper.init());
window.addEventListener('flipper-store-ready', () => global.flipperInit());
</script>
<script src="bundle.js"></script>
</body>