The good news: Tutor has been keeping up with improvements to Open edX frontends. Since Palm, Tutor now runs nine different micro-frontend apps by default!
The bad news: In development mode (tutor dev
), this results in very high resource consumption, since each micro-frontend uses its own Docker container. Depending on how much memory you have, running tutor dev start
in Palm or Nightly might freeze your machine.
The workaround: You can lower tutor-dev’s resource consumption by creating a simple plugin that disables the MFEs that you don’t strictly need. Create a file at "$(tutor plugins printroot)/fewermfes.py"
:
from tutormfe.hooks import MFE_APPS
MFES_TO_KEEP = ["learning", "gradebook", "course-authoring"]
@MFE_APPS.add()
def _remove_extra_mfes(apps: dict) -> dict:
return {
app_name: app
for app_name, app in apps.items()
if app_name in MFES_TO_KEEP
}
Then, enable it, and re-initialize the MFE plugin:
tutor plugins enable fewermfes
tutor config save
tutor dev do init --limit=mfe
tutor dev reboot
You can modify MFES_TO_KEEP
to suit your needs. Remember to disable this plugin before using production mode (tutor local
), unless you want to run the deprecated frontends!
Longer term: We are working on improvements to tutor-mfe so that tutor-dev will only use a single Docker container, regardless of how many micro-frontends are installed: Support `npm start` on host for MFE development · Issue #123 · openedx/wg-developer-experience · GitHub