Help for micro-frontend / monorepo architecture

This page summarizes the projects mentioned and recommended in the original post on /r/AskProgramming

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • turbo

    Incremental bundler and build system optimized for JavaScript and TypeScript, written in Rust – including Turbopack and Turborepo.

  • I wanted to use Svelte(kit) since it's the framework I'm currently using and confortable with. On top of that I need to implement the MFs architecture. So I looked over Turborepo and I really like it ! But the issue is that I need to have routes inside some of the micro frontends. And that is were I dont really know how to do. I can currently import Svelte modules inside the general Sveltekit app shell, but these modules don't have inner routes. (Cf. Turborepo's Sveltekit exaple : https://github.com/vercel/turbo/tree/main/examples/with-svelte)

  • svelte-routing

    A declarative Svelte routing library with SSR support

  • So my questions are : Is it possible to have routes inside the MFs ? If yes, should I use something like this (https://github.com/EmilTholin/svelte-routing) even if it's not official svelte support ? I don't really see informations about entry points on the Turborepo doc. I want to be able to work on each MF independantly (I mean see them in the browser in dev mode) but then just serve them as modules for the app shell in prod mode. I imagine this is possible but is it a configuration I need to implement myself with the package.json files or is it about Turborepo ? I read this (https://michalzalecki.com/micro-frontends-module-federation-monorepo/) article about a similar approach with Webpack, but in this article I don't quite see where is the difference between the bundling part of Webpack (wich can be whatever I want Vite for Svelte, Turbo for Next, etc.) and the monorepo handling part. So how/why only one tool (webpack) instead of many others (turborepo + other bundlers) ?

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts