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

Federated Angular Micro Frontends with Module Federation @AngularAir

Federated Angular Micro Frontends with Module Federation @AngularAir

15934fa2aa7b2ce21f091e9b7cffa856?s=128

Manfred Steyer
PRO

January 29, 2021
Tweet

Transcript

  1. @ManfredSteyer ManfredSteyer Federated Angular Micro Frontends w/ Module Federation Manfred

    Steyer, ANGULARarchitects.io
  2. @ManfredSteyer

  3. @ManfredSteyer Micro Frontends

  4. @ManfredSteyer Plugin-based Workflow Designer

  5. @ManfredSteyer

  6. @ManfredSteyer Contents #1: Module Federation #2: Federated Angular #3: Live-Coding

    #4: Possible 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 When can we have it? Webpack 5 and Module

    Federation: final Angular CLI 11 + webpack 5: experimental Angular CLI 12 (May 2021): webpack 5 integrated
  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 d Slides & Examples Remote Company Workshops and Consulting

    http://angulararchitects.io