Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

Version 1 Next »

This is the results of analyzing the dependencies in the 22 micro-frontends in the Open edX GitHub organization.

Approach

  1. Opening the package.json of each of the 22 repos.

  2. Copying out the dependencies and dev dependencies into one big text file.

  3. Sort the lines alphabetically.

    1. Adjusted for any “@edx” to “@openedx” inconsistencies as we migrate orgs.

  4. Scan the list (800 lines or so) for dependencies used by all or nearly all of the MFEs.

  5. Write them down.

  6. Augment that raw data with domain knowledge about:

    1. Packages that contain/expose others (@edx/frontend-platform provides history, react-intl, @reduxjs/toolkit exposes both redux and reselect, paragon has icons now, etc.)

    2. Packages we want to move away from (i.e., please no more redux-saga, @fortawesome/*, etc.)

    3. Packages we want to move toward (i.e., all MFEs should have @edx/frontend-component-header and @edx/frontend-component-footer dependencies even if they don't for some reason)

  7. Use bundlephobia.com to get bundle sizes for the dependencies to add more context.

Findings

Common Dependencies

The following packages are used by all or nearly all Open edX micro-frontends. This is only including dependencies - the assumption is that devDependencies are likely necessary for an MFE to build itself, and therefore less interesting for this exercise since they can’t be meaningfully ‘combined’ in most cases. If they were, they’re generally already part of @edx/frontend-build.

Package

Size

Notes

@edx/brand

@edx/frontend-component-footer

88.1k

@edx/frontend-component-header

@edx/frontend-platform

355.3k

@openedx/paragon (or @edx/paragon)

classnames

0.8k

core-js

241.1k

prop-types

0.9k

react

6.4k

react-dom

130.2k

react-redux

11.2k

react-router

58.9k

react-router-dom

77.1k

redux

3.7k

regenerator-runtime

6.6k

Total: 892.2k

  • No labels