mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-25 11:13:41 +00:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user