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

server-side-rendering without server side rendering #4331

Open
evgeniya-ch opened this issue Jan 17, 2025 · 0 comments
Open

server-side-rendering without server side rendering #4331

evgeniya-ch opened this issue Jan 17, 2025 · 0 comments

Comments

@evgeniya-ch
Copy link

evgeniya-ch commented Jan 17, 2025

Actual result:

<body>
<div id="root">
  <div>
    <div style="background-color:black;color:lightgrey;padding:1rem">
      <h1>Module Federation Example: Server Side Rendering</h1>
      <h2>This is the shell application.</h2>
    </div>
    <!--$!--><template></template><h1>Loading....</h1><!--/$-->
  </div>
</div>
<script async data-chunk="main" src="http://localhost:3000/static/main.js"></script>
</body>

Expected result:

<body>
<div id="root">
  <div>
    <div style="background-color:black;color:lightgrey;padding:1rem">
      <h1>Module Federation Example: Server Side Rendering</h1>
      <h2>This is the shell application.</h2>
    </div>
    <div style="background-color: green; color: lightgrey; padding: 1rem;">
      <h2>Remote 1: Content</h2>
      <p>This is the content from remote 1, which will include an image component exposed by
        remote2. This demonstrates nested federated modules being rendered server-side.</p>
      <div style="background-color: red; color: lightgrey; padding: 1rem; width: 500px;">
        <h2>Remote 2: Image</h2>
        <button style="margin-bottom: 1rem;">Click me to test i'm interactive!</button>
        <img src="https://i.ibb.co/jfTvC6Q/serge.jpg" alt="serge" border="0" style="width: 100%;">
      </div>
    </div>
  </div>
</div>
<script async data-chunk="main" src="http://localhost:3000/static/main.js"></script>
</body>

On server error:
Image

Client work normal:

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

1 participant