Draft: Add MFE POC: Module Federation remote into monolith

What does this MR do and why?

Add MFE POC: Module Federation remote into monolith

Validates the full browser -> Rails -> HAML -> Webpack -> Vue mount lifecycle and introduces a micro-frontend proof-of-concept for the Duo Chat surface.

Changes:

  • mfe_loader/index.js: loadMFEModule() via new Function import(); buildGitLabContext() collects gon + CSRF + el.dataset into a typed GitLabContext prop for the MFE component
  • pages/projects/duo_chat_poc/show/index.js: page bundle that auto-loads via webpack_controller_bundle_tags and mounts the MFE
  • duo_chat_poc_controller.rb: pushes feature flags, sets @mfe_url, gates on :mfe_duo_chat_poc
  • show.html.haml: mount element with data-* attributes
  • config/feature_flags/development/mfe_duo_chat_poc.yml: CE flag
  • config/routes/project.rb: GET /-/duo-chat-poc
  • doc/development/fe_guide/micro_frontends.md: RFC covering the validated monolith request lifecycle, GitLabContext data contract, all POC findings (Webpack 4, vite-plugin-federation named exports, strict-dynamic CSP, relative API URLs, Vue isolation), production same-domain strategy, strangler-fig plan, and open questions.

MFE repo (Vite + Vue 3 + TS + @originjs/vite-plugin-federation) will be published separately.

Co-Authored-By: Claude Sonnet 4.6 (1M context) noreply@anthropic.com

References

Screenshots or screen recordings

Before After

How to set up and validate locally

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

re gitlab-org#22344

Edited by Rafa Frederico

Merge request reports

Loading
Loading