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

PreloadRemote should not load shared modules again #2377

Open
5 tasks done
ScriptedAlchemy opened this issue Apr 25, 2024 · 0 comments
Open
5 tasks done

PreloadRemote should not load shared modules again #2377

ScriptedAlchemy opened this issue Apr 25, 2024 · 0 comments
Labels
🐞 bug Something isn't working team

Comments

@ScriptedAlchemy
Copy link
Member

ScriptedAlchemy commented Apr 25, 2024

Describe the bug

When using preloadRemote, it should verify that the shared dependencies are not already loaded.

If remote category is all it will duplicate chunks loaded already.
In this case react is already shared by host, but when hovering on remote, localhost 3002 react is downloaded.

image

In this case, if i hover on remote 2 navigation link, it will call preloadRemote - but preload fetch JS that already is on the page from initial load.

Reproduction

module-federation/module-federation-examples#3833

Used Package Manager

npm

System Info

System:
    OS: macOS 14.0
    CPU: (12) arm64 Apple M2 Pro
    Memory: 294.48 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.16.0/bin/yarn
    npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
    pnpm: 8.6.8 - ~/.nvm/versions/node/v16.16.0/bin/pnpm
    bun: 1.0.7 - ~/.nvm/versions/node/v16.16.0/bin/bun
  Browsers:
    Chrome: 124.0.6367.62
    Safari: 17.0

Validations

@zhoushaw zhoushaw added 🐞 bug Something isn't working team labels Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working team
Projects
None yet
Development

No branches or pull requests

2 participants