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:
parent
f03200f8e6
commit
f1e5b95554
13 changed files with 386 additions and 7 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue