Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Micro Frontends and Nx Monorepos: The Best of Two Worlds? @NxConf 2021

Micro Frontends and Nx Monorepos: The Best of Two Worlds? @NxConf 2021

15934fa2aa7b2ce21f091e9b7cffa856?s=128

Manfred Steyer
PRO

September 16, 2021
Tweet

Transcript

  1. @ManfredSteyer ManfredSteyer Micro Frontends and Nx Monorepos: The Best of

    Two Worlds? Manfred Steyer, ANGULARarchitects.io
  2. @ManfredSteyer Bonnie Barstow, PhD

  3. @ManfredSteyer

  4. @ManfredSteyer

  5. @ManfredSteyer Booking Booking Check-in Check-in Boarding Boarding Luggage Luggage

  6. @ManfredSteyer Booking App Booking App Check-in App Check-in App Boarding

    App Boarding App Luggage App Luggage App
  7. @ManfredSteyer

  8. @ManfredSteyer

  9. @ManfredSteyer Booking App Booking App Check-in App Check-in App Boarding

    App Boarding App Luggage App Luggage App
  10. @ManfredSteyer

  11. @ManfredSteyer

  12. @ManfredSteyer #1 Monorepo vs. Multirepo #2 Module Federation #3 Federation

    w/ Monorepos
  13. @ManfredSteyer Manfred Steyer

  14. @ManfredSteyer

  15. @ManfredSteyer Booking Booking Boarding Boarding Shared Shared Feature Feature Feature

    Feature Feature Feature Feature Feature Feature Feature … … … … … … … … … … … … … … … … … … Booking App Booking App Boarding App Boarding App Publish shared libs seperately via npm Repository n Repository 2 Repository 1 Version Mismatches? Strict Borders
  16. @ManfredSteyer Booking Booking Boarding Boarding Shared Shared Feature Feature Feature

    Feature Feature Feature Feature Feature Feature Feature … … … … … … … … … … … … … … … … … … Booking App Booking App Boarding App Boarding App
  17. @ManfredSteyer

  18. @ManfredSteyer

  19. @ManfredSteyer • • •

  20. @ManfredSteyer

  21. @ManfredSteyer

  22. @ManfredSteyer const Component = await import('http://other-app/xyz')

  23. @ManfredSteyer Shell (Host) Microfrontend (Remote) // Maps Urls in //

    webpack config remotes: { mfe1: "mfe1" } // Expose files in // webpack config exposes: { './Cmp': './my.cmp.ts' } import('mfe1/Cmp')
  24. @ManfredSteyer Shell (Host) Microfrontend (Remote) RemoteEntry.js <script src="…"></script>

  25. @ManfredSteyer Shell (Host) Microfrontend (Remote) shared: [ "@angular/core", "…" ]

    shared: [ "@angular/core", "…" ]
  26. @ManfredSteyer

  27. @ManfredSteyer

  28. @ManfredSteyer

  29. @ManfredSteyer

  30. @ManfredSteyer Separately deployed Just loaded once

  31. @ManfredSteyer

  32. @ManfredSteyer

  33. @ManfredSteyer

  34. @ManfredSteyer Deploy MFE1 Change Shared Lib Deploy MFE2 Conflict?

  35. @ManfredSteyer

  36. @ManfredSteyer

  37. @ManfredSteyer ➔ ➔ ➔

  38. @ManfredSteyer ANGULARarchitects.io/book Updated for Module Federation and Alternatives

  39. @ManfredSteyer Runtime Integration Autarkic Teams One-Version- Policy Access Restrictions

  40. @ManfredSteyer

  41. @ManfredSteyer d Slides & Examples Remote Company Workshops and Consulting

    http://angulararchitects.io