The Microfrontend Revolution Module Federation with Angular @ngConf

The Microfrontend Revolution Module Federation with Angular @ngConf

15934fa2aa7b2ce21f091e9b7cffa856?s=128

Manfred Steyer

November 20, 2020
Tweet

Transcript

  1. @ManfredSteyer ManfredSteyer The Microfrontend Revolution Module Federation with Angular Manfred

    Steyer, ANGULARarchitects.io
  2. @ManfredSteyer

  3. @ManfredSteyer

  4. @ManfredSteyer Contents #1: Module Federation #2 Federated Angular #3: Possible

    Roadmap
  5. @ManfredSteyer Manfred Steyer

  6. @ManfredSteyer

  7. @ManfredSteyer

  8. @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!
  9. @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')
  10. @ManfredSteyer How to Get the Microfrontend's URL? Shell (Host) Microfrontend

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

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

  13. @ManfredSteyer ?

  14. @ManfredSteyer Custom Builder

  15. @ManfredSteyer

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

    ng serve
  17. @ManfredSteyer

  18. @ManfredSteyer

  19. @ManfredSteyer When can we have it? Webpack 5 and Module

    Federation: final Angular CLI must support webpack 5 too Angular CLI 11 (Beta) allows to opt into webpack 5 Angular CLI 11 ? (fall 2020)
  20. @ManfredSteyer Free eBook ANGULARarchitects.io/book Updated for Module Federation and Alternatives

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

    Federated Angular
  22. @ManfredSteyer d Slides & Examples Remote Company Workshops and Consulting

    http://angulararchitects.io