nksaraf / vinxi

The Full Stack JavaScript SDK
https://vinxi.vercel.app
MIT License
2.21k stars 80 forks source link

[Feature] ability to load multiple featureApps from separate host/sub-domain #305

Open akhilshastri opened 6 months ago

akhilshastri commented 6 months ago

usecase - for an enterprise application, different teams building domain specific features, if it's a one SPA - then it needs to bundle together hence a whole release cycle is require - which is costly.

if we could split the entire application in small mini-apps and load as one single app at runtime then every team can have separate individual builds/release - hence smaller release and QA only for mini-app.

Webpack 5 has module-federation which something similar but it bundles dependency ahead of time hence larger bundle size or not suitable for Server side rendering or for React Server Components.

Can we build a better solution with Vinxi (may be a vite plugin - which further can useful to other framework..?)

snewell92 commented 4 months ago

I'm curious adopting proper module federation could work in vite/vinxi; the protocol is there and if it can be a vite plugin that's great, but it feels like it's more at the vinxi layer.

snewell92 commented 4 months ago

The work done in rsbuild right now is a great reference: https://rsbuild.dev/guide/advanced/module-federation

swalker326 commented 1 month ago

I'm also interested in this, the module federation team has a vite plugin also. https://github.com/module-federation/vite

I've been grinding away in a tanstack start project, maybe it would be wise to boil it down to a lower level with just vite/vinxi