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

Dependencies are duplicated in bundles #7065

Closed
jansav opened this issue Jan 31, 2023 · 2 comments · Fixed by #7115
Closed

Dependencies are duplicated in bundles #7065

jansav opened this issue Jan 31, 2023 · 2 comments · Fixed by #7115
Assignees
Labels
bug Something isn't working p0
Milestone

Comments

@jansav
Copy link
Contributor

jansav commented Jan 31, 2023

Describe the bug
Current size of "open-lens" renderer -bundle is over 60 MB. There's duplicated instances of dependencies.
There must be something wrong with current setup.

core/static/build/renderer.js
image

@jansav jansav added bug Something isn't working p0 labels Jan 31, 2023
@jansav jansav self-assigned this Feb 1, 2023
@jansav
Copy link
Contributor Author

jansav commented Feb 2, 2023

There’s multiple things that need to be fixed in order to make it work properly.

  1. Library package core needs to make all of it’s dependencies external, which means that they are not included in the bundle.
  2. OpenLens monorepo needs to be changed to use Yarn/NPM workspaces which means that all dependencies are hoisted to root level. This ensures that there’s only one instance of a dependency. Without this, there’s e.g. react installed in packages/core/node_modules and packages/open-lens/node_modules .
  3. The second bullet leads to unknown amount of stuff that needs to be fixed, because it seems that building core doesn’t work properly with workspaces being enabled.

@Nokel81
Copy link
Collaborator

Nokel81 commented Feb 13, 2023

Moving to 6.5.0 since the rest of this work can be delayed until after 6.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants