Dynamic Loading of Micro Frontends: What Secrets Are You Missing Out On?

Поділитися
Вставка
  • Опубліковано 25 жов 2024

КОМЕНТАРІ • 10

  • @ahmedadeebarshadahmed3047
    @ahmedadeebarshadahmed3047 4 місяці тому +1

    HI Subrath, Thank you for the great videos by you, I have a question regarding this topic, how can we use a webcomponent created using module federation from 2 different monorepos, lets say base app is in a different monorepo and the webcomponent is in another monorepo, how can we load it using module federation strategy ? Thank you :)

  • @user-bx7yg7kd8q
    @user-bx7yg7kd8q 2 місяці тому

    Hi subrat, please make a video for ANgular 17,18 to handle stand alone in micro front ends

  • @VivekSharma24290
    @VivekSharma24290 Рік тому

    Hey Subrat, thank you for taking the feedback, and creating this video. I do get what we are trying to do here, but the real challenge lies when we are trying to load the environment specific files, like config.dev.json/config.json/config.uat.json + environment.ts files of the remote module. Any inputs on this from you, will be really great.. Thank You again.

    • @FunOfHeuristic
      @FunOfHeuristic  Рік тому

      The ideal use of making micro front ends so they will be decoupled from each other, can you please explain a scenario where you need this.

    • @VivekSharma24290
      @VivekSharma24290 Рік тому

      @@FunOfHeuristic So, assume that the Micro front end, has a separate CI/CD for deployment. During the Deployment, its going to pick up environment specific files. From out Host application, which will also have > 1 environment, how can we make sure that we are hitting the correct Remote URL? For this, I would need to load the assets/configs etc folder into my host application so that host application knows, which url it needs to point to.. Also NX already comes with "loadRemoteModule" which can be used to load the remote modules, in the route as well.. Can we try this?

    • @VivekSharma24290
      @VivekSharma24290 Рік тому

      Subrat, were you able to identify something to above scenario regarding loading of configs/routes etc?

    • @FunOfHeuristic
      @FunOfHeuristic  Рік тому

      Hey you can use setRemoteDefinitions and fetch your destination from a json file, and In router you can use loadRemoteModule to load corresponding route

    • @VivekSharma24290
      @VivekSharma24290 Рік тому

      ​@@FunOfHeuristic Set remote definition will load the remote URL. but how do I access the configs in the remote module, because the remote module might try to access the host application port -> assets/configs etc, where as it should access remoteModule->assets/config etc