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

Shared dependencies is loaded sequentially #594

Open
ElielGez opened this issue Apr 10, 2024 · 5 comments
Open

Shared dependencies is loaded sequentially #594

ElielGez opened this issue Apr 10, 2024 · 5 comments

Comments

@ElielGez
Copy link

ElielGez commented Apr 10, 2024

Hello,
I noticed that when I'm putting shared dependencies inside federation plugin it's loading those dependencies sequentially and not in parallel, This is causing bad performance when page first init..
Maybe I'm missing something, but couldn't find anything related to this in docs

Versions

  • vite-plugin-federation: 1.2.3
  • vite: 4.4.5

Reproduction

Please see the waterfall chart below:
image

Steps to reproduce

Just set federation plugin like this:
federation({
name: 'host',
filename: 'remoteEntry.js',
remotes: {
},
shared: ['react','react-dom','uuid','bowser', etc..]
}),

What is Expected?

Load in parallel to reduce loading time

What is actually happening?

Loading sequentially

@infantito
Copy link

@ElielGez , how do you solve it? I have the same issue.

@zhangHongEn
Copy link

https://github.com/module-federation/vite/blob/e5f0faac8ee9fcb98e3c179d70ad88f198206fdb/examples/vite-vite/vite-remote/vite.config.js#L31
Using manifest.json can help preload, which is very beneficial for performance.

@wwff
Copy link

wwff commented Oct 11, 2024 via email

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Hello! I have received your email

@liuwanlong
Copy link

the same problem,what is the solusion?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants