Over the past few years, micro-frontend architecture has been searching for the right path. However, what we've witnessed are various complex technical solutions that simulate an ideal micro-frontend world through layers of wrapping and artificial isolation. These solutions bring heavy performance burdens, complicate simple development, and obscure standard processes.
In practicing micro-frontend architecture, we've deeply experienced the many constraints of traditional approaches:
These issues were particularly evident in a 2019 enterprise project we worked on. A large product was split into over a dozen independent business subsystems that needed to share a set of base components and business components. The initial npm-based component sharing solution revealed serious maintenance efficiency problems: when shared components were updated, all dependent subsystems required full rebuilds and redeployments.
To solve component sharing efficiency issues, Esmx v1.0 introduced the RemoteView component mechanism based on HTTP protocol. This solution achieved on-demand code assembly between services through runtime dynamic requests, successfully addressing long build dependency chains. However, due to the lack of standardized runtime communication mechanisms, state synchronization and event passing between services still suffered from efficiency bottlenecks.
In v2.0, we adopted Webpack 5.0's Module Federation technology. This technology significantly improved service collaboration efficiency through unified module loading mechanisms and runtime containers. But in large-scale practice, Module Federation's closed implementation introduced new challenges: precise dependency version management became difficult, especially when unifying shared dependencies across multiple services, often leading to version conflicts and runtime exceptions.
When planning v3.0, we closely observed frontend ecosystem trends and found that advancements in browser-native capabilities opened new possibilities for micro-frontend architecture:
With mainstream browsers fully supporting ES Modules and the maturation of Import Maps specification, frontend development has entered a true modular era. According to Can I Use statistics, native ESM support in major browsers (Chrome >= 89, Edge >= 89, Firefox >= 108, Safari >= 16.4) has reached 93.5%, providing these advantages:
With compatibility mode support (Chrome >= 87, Edge >= 88, Firefox >= 78, Safari >= 14), browser coverage can be further increased to 96.81%, allowing us to maintain high performance without sacrificing support for older browsers.
The native module system brings not just standardization, but qualitative improvements in performance and isolation:
Choosing the right build tool was a critical decision in implementing this technical solution. After nearly a year of research and practice, our selection evolved as follows:
Vite Exploration
Rspack Adoption
This decision allowed us to maintain development experience while gaining more stable production environment support. The combination of ESM and Rspack ultimately enabled us to build a high-performance, low-intrusion micro-frontend solution.
In future development, Esmx framework will focus on three key directions:
Through these optimizations and extensions, we aim to make Esmx a more complete and user-friendly micro-frontend solution, providing developers with better experience and higher efficiency.