DEV Community

Discussion on: Understanding Transitional JavaScript Apps

Collapse
 
ryansolid profile image
Ryan Carniato

Microfrontends are one solution. All architectures face scaling problems. MPAs might take longer but we still get there with sufficient desire for re-usability and unified experience. I'm not here to crap on SPAs to be clear. I like SPAs and I think they have a plenty of utility. I'm just saying there are different ways to to attack this, each with different tradeoffs. Everything isn't the same, and that's OK.

Module Federation is an interesting idea, but it doesn't change the fundamental math. Either everything is on the same deps, which means you didn't need module federation if you can enforce it. Or things can have their own version at which point you were probably better bundling with your app to leverage tree shaking (ie.. only load the Lodash functions your app uses). The middle ground is sort of no good for anyone, and when you consider Module Federation has its own overhead (often client side orchestration with fetching waterfalls) what are you left with. I think combining this technology with server side rendering is probably the way to go, but first we need to have the right technology to deliver those woven server experiences.

Collapse
 
kohlerm profile image
Markus Kohler

I am also not convinced that webpacks federation are the full solution. With regards to bundling I wonder why we have not yet yet seen more attempts on server side dynamic bundling.