[Module-Federation] Can't find module sdk/dist/dist/index.cjs.js #27964
Labels
blocked: third-party
outdated
scope: module federation
Issues related to module federation support
type: bug
Current Behavior
I followed the steps on https://nx.dev/recipes/react/module-federation-with-ssr to setup a basic SSR workspace. I removed the checkout remote and cleaned some stuff up. It was all working up until the point that I want to just render out the HTML provided by SSR, based upon a remote component.
If you run the
nx run store:serve:development --verbose
command and go to http://localhost:4200/v2 - you'll see that there is no output from the server. Just the error below. While I would just expect it the have the html output from the component wrapped in a<div id="root"></div>
.The normal http://localhost:4200 just works fine.
What I noticed in the error is that there is a double
/dist/dist/
in there, which I presume to be a bug of some sorts.Expected Behavior
Being able to output plain html from a SSR service.
GitHub Repo
https://github.com/KyorCode/nx-mf-test
Steps to Reproduce
nx run store:serve:development --verbose
Nx Report
Failure Logs
Package Manager Version
4.5.0 ( yarn )
Operating System
Additional Information
My end goal is to have module federated SSR service which just outputs the component HTML and returns it in a response. The reason is that this service is called by a CMS system and all the frontend/browser related stuff is handled there. Not in the SSR service.
The text was updated successfully, but these errors were encountered: