We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Module Federation Runtime significantly increases the size of the deliverable.
npm create vite
Here is the result of build command :
dist/assets/index-B5Qt9EMX.js 0.71 kB
@module/federation-runtime
init
import { init } from "@module-federation/runtime"; init({ name: "vite-vanilla", remotes: [ { name: "remote1", entry: "http://localhost:4321/assets/remotesEntry.js" }, ], });
The result of the build command significantly increases :
dist/assets/index-DjYITZnQ.js 63.77 kB
When I check the contents of the deliverable, I notice that the entire runtime library is present
https://github.com/nicotu01/vite-vanilla-federation-tree-shaking
npm
-
The text was updated successfully, but these errors were encountered:
init requires the full system, runtime cannot be shaken in vite. in webpack and rspack we can share it, making the remotes only 14kb
Sorry, something went wrong.
Hi @ScriptedAlchemy ! Without talking about sharing, I'm simply building an application that invokes the init function of @module-federation/runtime
I try it with webpack and have the same result : the bundle size is very heavy.
I just have an ìndex.js :
ìndex.js
And the webpack build result :
dist/assets/index-DjYITZnQ.js 65.93 kB
No branches or pull requests
Describe the bug
Module Federation Runtime significantly increases the size of the deliverable.
npm create vite
. Then, I deleted all the JavaScript code.Here is the result of build command :
@module/federation-runtime
and simply invokedinit
function from main.ts :The result of the build command significantly increases :
When I check the contents of the deliverable, I notice that the entire runtime library is present
Reproduction
https://github.com/nicotu01/vite-vanilla-federation-tree-shaking
Used Package Manager
npm
System Info
Validations
The text was updated successfully, but these errors were encountered: