Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paragon installed as dependency instead of peer dependency #455

Closed
adamstankiewicz opened this issue Jan 11, 2024 · 0 comments · Fixed by #456
Closed

Paragon installed as dependency instead of peer dependency #455

adamstankiewicz opened this issue Jan 11, 2024 · 0 comments · Fixed by #456

Comments

@adamstankiewicz
Copy link
Member

adamstankiewicz commented Jan 11, 2024

@openedx/paragon is installed as a dependency within package.json for this repo. As a result, Paragon is included as part of the code bundle generated by frontend-component-header. Given this, consumers (MFEs) using frontend-component-header are effectively requiring users to download duplicate copies of Paragon (more than likely at different versions, too): one copy of Paragon for the MFE and another copy of Paragon for frontend-component-header.

That said, because Paragon supports tree shaking, only the components directly used by frontend-component-header are included in the bundle (i.e., not the entire library).

Generally, Paragon should be treated as a peer dependency in Open edX JS libraries, relying on the installed version of Paragon provided by the consumer (MFE). For some reason, the peer dependency was (incorrectly) removed in favor of a regular dependency in this PR.

@adamstankiewicz adamstankiewicz changed the title Paragon is installed as a dependency instead treated as peer dependency Paragon installed as dependency instead peer dependency Jan 11, 2024
@adamstankiewicz adamstankiewicz changed the title Paragon installed as dependency instead peer dependency Paragon installed as dependency instead of peer dependency Jan 11, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Closed in Frontend Working Group Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
1 participant