Task /core: Create a new experiment for SSR of remote modules in Next.js
webcrumbs-community opened this issue · 10 comments
We're extending our existing setup to allow server-side loading of remote modules with Next.js.
What Needs to Be Done?
The mission here is to take /core/experiment-1
and make a new sibling: experiment-x
(where 'x' is the next available number). This new experiment will enable server-side loading of dynamic remote modules in Next.js.
Related to discussion #91
Why Is This Important?
Server-side loading comes with a handful of benefits, such as improved SEO and quicker initial load times. It's worth exploring this to understand its impact on our project and potentially optimize package behavior.
Skills Needed
- JavaScript
- Next.js
- Server-Side Rendering (SSR)
- Module Federation
- Or, hey, just the curiosity to learn these skills!
Requirements
- Clone
/core/experiment-1
into a new directory,/core/experiment-x
. - Modify
experiment-x
to enable server-side loading of remote modules in Next.js. - Validate that the new setup works as expected.
We're about to turn the page on a new chapter of WebCrumbs. Head on over to our GitHub repo and take your seat for this exciting ride!
I verified experiment-1 works fine
plugin1 and admin Dependencies can be shared
When loading plugin1 and plugin2, some dependencies should be shared, such as react react-dom and moment
Thanks, @rovoskarl! Yes, you're right, they should share. I'll fix it if it isn't already.
On experiment-1, the issue is it's now composing at the client, so our challenge is to make it composes on the server. Do you have any thoughts on this?
@rovoskarl Can we connect offline? If yes, please let me know your email or discord handler. I can connect to you through that.
I want to discuss this server side module management and I have some queries
sure This is my discord: _kar001 mail: admin@giftfam.us @aditya4196
I think we should start a discussion group on discord @webcrumbs-community
Ow, yes! We do have, @rovoskarl. Here goes the link: https://discord.gg/ymVgdPe6rK
Cheers!
@rovoskarl Please join the discord channel so we can talk on that channel.
I'm kind of stuck in some other urgent issues. But would be available this coming weekend onwards to discuss and work on the module.
Added experiment-3 with VM. I'm still discussing the pros and cons of this approach.
Hi, guys. I added an experiment-4 with SSR. There are still many limitations, as I included in the README.md file of that experiment. I'll open a new issue for us to move further. Cheers!