Streaming, Module Federations questions ๐
oceangravity opened this issue ยท 0 comments
oceangravity commented
Hi @manucorporat, I hope you're well.
Thanks for this fantastic example with SSRender and containers, I perceive that it is like Module Federation, although more like streaming. I would like to ask you a couple of things:
- I tried to import a component in this way, but it doesn't work because I think it may be missing a setting in the Vite plugin to allow dynamic imports. But let's say it works, do you think it would be possible to call a component in this way?
const Component = await import(`~/components/${componentName}`)
Note: I also tried with with /* @vite-ignore */
comment, but I tried it too with no success.
-
Do you think it would be possible to use something similar to Module Federation? Like a plugin where you can place the components that we want to share?
-
On the other hand, is it possible to build components on-the-fly? For example, imagine that I have a component and through the CLI I can create a build of that component.
Thanks a lot!