Wire up module loading to application startup (#21703)

* Early module loader bundler

* Add a module installer script

* Add dev-friendly docs

* Add real module-api dependency

* Speed up `yarn add` for mulitple modules

* Fix version check for modules

* Appease the linter
This commit is contained in:
Travis Ralston 2022-07-05 20:26:54 +02:00 committed by GitHub
parent f03200f8e6
commit f1e5b95554
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 386 additions and 7 deletions

View file

@ -113,6 +113,7 @@ async function start() {
loadLanguage,
loadTheme,
loadApp,
loadModules,
showError,
showIncompatibleBrowser,
_t,
@ -155,6 +156,11 @@ async function start() {
// now that the config is ready, try to persist logs
const persistLogsPromise = setupLogStorage();
// Load modules before language to ensure any custom translations are respected, and any app
// startup functionality is run
const loadModulesPromise = loadModules();
await settled(loadModulesPromise);
// Load language after loading config.json so that settingsDefaults.language can be applied
const loadLanguagePromise = loadLanguage();
// as quickly as we possibly can, set a default theme...
@ -209,6 +215,7 @@ async function start() {
// assert things started successfully
// ##################################
await loadOlmPromise;
await loadModulesPromise;
await loadThemePromise;
await loadLanguagePromise;