Why does Module Federation still put non-shared dependencies as a separate vendor chunk? #2727
Unanswered
hskrishandi
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed that even when I don't put anything into the
shared
field, Module Federation will still generate a separate chunk for the dependencies (vendor chunks).e.g With the following setup
Then I will get two files related to the module federation:
index.js
axios
andlodash
Is there a way so that the module federation can just produce 1 chunk that contains all
index.js
,axios
,lodash
? If it's not possible, then may I know the reason of why vendor codes need to be separate chunk, even though it's not specified inshared
? Sincevendor_*
will always get downloaded whenindex
is loaded anyway.Thanks beforehand, it's been a really awesome experience using this plugin 🙏
Beta Was this translation helpful? Give feedback.
All reactions