TLDR Tech / Dev
Under the hood of MDN's new frontend
MDN rebuilt its frontend from a React SPA to a Lit-based architecture using web components for interactivity and custom server components for static templating, solving the core problem of React being unable to reach into documentation HTML. The new setup auto-discovers and lazy-loads only the JS/CSS each page actually needs, uses Declarative Shadow DOM for pre-JS rendering, and switches from Webpack to Rspack, dropping dev server startup from two minutes to two seconds.
Read the full story