Comments (12)
Okay for the get public path thing.
You can try public path "auto" as we added support for manifest protocol to use auto mode. Now sure on getPublicPath as it's been a lower priority item right now.
from universe.
hey , you can upgrade @module-federation/[email protected]
and try again
from universe.
Thanks @2heal1 , no duplicates now!
from universe.
Can you supply a repo with a reproducible example.
from universe.
Here is the reproducible repo @ScriptedAlchemy kindly check and let me know how to solve this.
__federation_expose_button.js
chunk request initiated two times from app1's app.js
and app2's entry.js
https://github.com/satheesh66/module-federation-v2
from universe.
It seems like preload issue , i will check again
from universe.
Ahh i find the issue , when preload link , the crossorigin attr should be the same , now the link is :
so it will not work (preload)
@zhoushaw Can you help to fix it ? I'm not sure when the crossorigin should work on specific scens
from universe.
Okay for the get public path thing.
You can try public path "auto" as we added support for manifest protocol to use auto mode. Now sure on getPublicPath as it's been a lower priority item right now.
We can't use the auto
since consumer services working as expected but the host service doesn't know the version, so we can't infer the proper public path. and auto
implementation is not available inside remoteEntry.js
file so that we need to change webpack filename
.
i am right now using like below in runtime plugin
handlePreloadModule: (args) => { args.remoteSnapshot.publicPath = window.publicPath; return args; }
from universe.
is there any estimates on when new release will be published with #2580 ?
Thnx!
from universe.
Thanks for the quick fix @zhoushaw. I have checked with "@module-federation/enhanced": "^0.0.0-next-20240605063149"
The duplicate chunk request issue is not fixed fully still some chunk requests happening two times one is from preload and another one is from remotEntry.js
file. this issue not happening in the POC project but happened in my organization's code. we have a lot of services. and facing some CSS chunk ordering issues after this preload fix
here is an example, the app3
manifest.json request is happening two times when I have dependencies like app1 <-- app2 <-- app3
(app1
consuming app2
and app2
consuming app3
).
![Screenshot 2024-06-05 at 21 16 35](https://private-user-images.githubusercontent.com/58605123/336915508-41c41cfc-9e0a-4250-b8dd-8f0b264d96eb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEyMjg1NTcsIm5iZiI6MTcyMTIyODI1NywicGF0aCI6Ii81ODYwNTEyMy8zMzY5MTU1MDgtNDFjNDFjZmMtOWUwYS00MjUwLWI4ZGQtOGYwYjI2NGQ5NmViLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE3VDE0NTczN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVmNDI3MDRlZmZjODYwMjhjMjg4NTI4MmNlMGIyNWMwOTZjODk0NTJmYjBiMDE5N2U1ZmQyMDdkZDE2MzYyNWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Vsf8N3m7kec_CStRlr0Fqf2wSvf9Hr4sxfErM3FdLpE)
added reproducible repo details - https://github.com/satheesh66/module-federation-v2
from universe.
Hello,
I've got the same issue with duplicate requests. Maybe my example will be useful for fix as well.
Registered it in another thread though: module-federation/module-federation-examples#4008 .
Test repo https://github.com/Ekaterina-T/webpack.mf.csi
Also vendor chunks duplication case from discord https://discord.com/channels/1055442562959290389/1247139075673161829
Interesting thing here is that it doesn't happen all the time: sometimes requests get duplicated sometimes not.
from universe.
Thanks for fix @zhoushaw @2heal1.
But the issue is not fully resolved still I am facing a duplicate request issue even after updating @module-federation/[email protected]
![image](https://private-user-images.githubusercontent.com/58605123/338853546-28d132d5-9d9b-483b-8bc9-a35f20201519.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEyMjg1NTcsIm5iZiI6MTcyMTIyODI1NywicGF0aCI6Ii81ODYwNTEyMy8zMzg4NTM1NDYtMjhkMTMyZDUtOWQ5Yi00ODNiLThiYzktYTM1ZjIwMjAxNTE5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE3VDE0NTczN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUwZmJiMTMyNDhiODlhODhiYTJlZjU0YTA2YjQ1MDA2NDZiOGYwNDcyMGU1YTE4NzI1YzkxOTJmM2JhMTllMDMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.iK5usAyKj3KKBEKfR6cEouXGxTakB40NKXEcRDRT2K0)
![image](https://private-user-images.githubusercontent.com/58605123/338853699-8cc9fd1a-ce14-4ac0-bf5f-60c43fa52f3e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEyMjg1NTcsIm5iZiI6MTcyMTIyODI1NywicGF0aCI6Ii81ODYwNTEyMy8zMzg4NTM2OTktOGNjOWZkMWEtY2UxNC00YWMwLWJmNWYtNjBjNDNmYTUyZjNlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE3VDE0NTczN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFiYjBlOWQyZGZmMDE4MWNiZDM5ZTQ2YjAwOGNlZGQ0OWYwYjczZmZhYjQ2YWM1YzNmYjdkMTQ3YjcwYTRkMDEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.c1hWV9Nq7dw2Uig8Zgo9Zr4qhzH4-AO1_xKC103FLJs)
![image](https://private-user-images.githubusercontent.com/58605123/338853813-331cd0f5-5303-434e-8a0c-bfe1953e5af6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEyMjg1NTcsIm5iZiI6MTcyMTIyODI1NywicGF0aCI6Ii81ODYwNTEyMy8zMzg4NTM4MTMtMzMxY2QwZjUtNTMwMy00MzRlLThhMGMtYmZlMTk1M2U1YWY2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE3VDE0NTczN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgyNjFmZTRlM2RjZjc2OTVlYTFkZTkzNjNiYzg3NzRlZWRkNzgyNmViMjAwMGEzODViYzg0OWNlZWE3NjE4ZGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.0B92l_0uEhsB0IdILft4ID3Ob-S4VYpCievGkp6Ftj8)
In the above screenshots, you can see the same chunk requested by multiple times (check the initiator chain in those requests)
the first request from the initial host's entry.js
file and further requests from other services entry.js
they have also used that chunk.
let me know if miss any thing! Thanks
@ScriptedAlchemy @2heal1 @zhoushaw
from universe.
Related Issues (20)
- dts for entries exposed with aliases are not emitting HOT 1
- Can't create Error Fallback when any Remote fails. HOT 7
- Chrome Extension is not working due to empty `moduleInfo` HOT 3
- web worker error in host HOT 2
- Exact matching alias does not work as expected in bridge webpack plugin HOT 2
- Shared dependency version cannot be resolved if installed at root of a monorepo
- Spaces in path to project with @module-federation/next-mf result in `Unterminated string in JSON at position` and HookWebpackError errors HOT 8
- how can I use in vue3 ts template HOT 5
- Cannot use vue2.7 lifecycle hook through module federation
- [CORS]: @module-federation/nextjs-mf HOT 3
- Cannot use shared module in .mjs file correctly HOT 4
- Adding element to page with id that matches remote's name causes `TypeError: remoteEntryExports.init is not a function` HOT 2
- External modules not shared HOT 4
- [MF Plugin] "promise new Promise" syntax doesn't work with @ char in it HOT 4
- Entry runtime miss function "O" HOT 5
- esbuild plugin error: Top-level await is not available in the configured target environment HOT 1
- @module-federation/nextjs-mf version 8.4.0 breaks API routes
- Having production error - TypeError: (void 0) is not a function at .next/server/webpack-api-runtime.js:1:199
- Nextjs plugin doesn't work unless the "unsafe-eval" CSP header is set
- Vue Bridge package lacks `dist` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from universe.