The Microfrontend Revolution Module Federation with Angular @jsPoland

The Microfrontend Revolution Module Federation with Angular @jsPoland

15934fa2aa7b2ce21f091e9b7cffa856?s=128

Manfred Steyer

November 20, 2020
Tweet

Transcript

  1. @ManfredSteyer ManfredSteyer The Microfrontend Revolution Module Federation Manfred Steyer, ANGULARarchitects.io

  2. @ManfredSteyer

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

    App Boarding App Luggage App Luggage App Micro Frontends
  4. @ManfredSteyer Micro Frontends

  5. @ManfredSteyer

  6. @ManfredSteyer Contents #1: Module Federation #2: Federated Angular #3: Roadmap

  7. @ManfredSteyer Manfred Steyer

  8. @ManfredSteyer

  9. @ManfredSteyer

  10. @ManfredSteyer Idea const Component = await import('http://other-app/xyz') Does not work

    with webpack/ Angular CLI Even lazy parts must be known at compile time!
  11. @ManfredSteyer Webpack 5 Module Federation 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')
  12. @ManfredSteyer How to Get the Microfrontend's URL? Shell (Host) Microfrontend

    (Remote) RemoteEntry.js <script src="…"></script>
  13. @ManfredSteyer How to Share Libs? Shell (Host) Microfrontend (Remote) shared:

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

  15. @ManfredSteyer ?

  16. @ManfredSteyer Custom Builder

  17. @ManfredSteyer

  18. @ManfredSteyer 1) ng add @angular-architects/module-federation 2) Adjust generated configuration 3)

    ng serve
  19. @ManfredSteyer

  20. @ManfredSteyer

  21. @ManfredSteyer Well … Webpack 5 is final! CLI 11 is

    final! CLI 11: Webpack 5 Opt-In (Experimental)
  22. @ManfredSteyer Free eBook ANGULARarchitects.io/book Updated for Module Federation and Alternatives

  23. @ManfredSteyer Conclusion Module Federation Loading Separately Deployed Code Micro Frontends

    Federated Angular
  24. @ManfredSteyer

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

    http://angulararchitects.io